The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: ceeac on December 02, 2018, 07:56:43 PM

Title: [patch] Editorconfig
Post by: ceeac on December 02, 2018, 07:56:43 PM
This patch adds a simple .editorconfig file to tell text editors to use consistent spacing by default (if the editor supports Editorconfig).
This should prevent mixed tabs and spaces for developers who use spaces for indentation (like myself).
Title: Re: [patch] Editorconfig
Post by: prissi on December 03, 2018, 05:29:25 AM
Thank you, I was not aware of that convention. But I am not sure if any developer here could profit from it.

And we never ever formally agree on a spacing at all. Although 4 is fine with me.

If one uses this, one should also enable trimming of whitespaces in all dat,cc,c,h and Makefiles (but not in txt and tab)

At least for MSVC I found these entries:
Code: [Select]
insert_final_newline
trim_trailing_whitespace
Title: Re: [patch] Editorconfig
Post by: ceeac on December 03, 2018, 07:11:52 AM
Updated patch:
Title: Re: [patch] Editorconfig
Post by: prissi on December 03, 2018, 11:32:55 AM
I was not against 4, but I think we just never talked about.

Anyway, I will include it, even though I cannot test it (MSVC 2012 is too old).
Title: Re: [patch] Editorconfig
Post by: prissi on March 21, 2019, 02:40:51 AM
Incorporated in r8728