Description
The current .editorconfig
settings are enforicing LF
EOLs on all files, which conflicts with Git defaults (core.eol = native
) which normalizes all text files to the native EOL, which under Windows means that all text files should be checked out using CRLF
. If end users have Git configured to core.autocrlf = true
(recommended) they won't be able to commit edited files, due to EditorConfig settings enforcing LF
at savetime. (see #6517)
I propose to adjust the .editorconfig
and add rules for each file type, instead of using the *
pattern, and use native EOL for text files that allow it, and only enforce LF
or CRLF
on extensions that strictly need them (e.g. make files, batch scripts, etc.).
I use EditorConfig settings in most of my repositories to enforce code-consistency validation of every commit and PR (via Travis CI, using EClint), so if it's OK with everyone I'd like to add code-styles validation to the repository. Here's an example of a repository using EditorConfig validation:
But the current .editorconfig
/.gitattributes
settings are far from ideal and need some extra attention if we want to also add code validation via Continuous Integration.