tools: enable final newline in .editorconfig
Checklist
-
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
tools
Description of change
This enables the final newline insertion for editors supporting .editorconfig
, which hopefully will eliminate noise in pull requests concerning the final newline.
The first commit is the result of the following command (requires GNU versions of find
and sed
):
$ find . -type f -not -path "./.git/*" -not -path "./deps/*" -not -path "./out/*" -not -path "./tools/eslint/*" -not -path "./tools/gyp/*" -not -path "./tools/icu/*" -not -path "./tools/msvs/*" -not -path "*/node_modules/*" -not -path "*.min.js" -not -path "./test/fixtures/*" -iregex '\(js\|cc\|h\|d\|man\|manifest|\rc\|md\|mardown\|eslintrc\|py\|txt\|sh\|pl\|json\|pem\|key\|crt\|ini\|cnf\|html\|css\|makefile\|gyp\|gypi\|mk\|status\|xml\|gitignore\|r\|tmpl\|stp\|spec\|remarkrc\|rc\|mailmap\|inc\|gitattributes\|eslintignore\|editorconfig\|1\)$' | xargs sed -i -e '$a\'
The only offending file was benchmark/README.md
. I've opted to not change test assets which would have required changes in a bunch of tests.
The second commit enables the editorconfig option. The pattern was written with the assumption that no one will manually edit files inside any node_modules
directory or .min.js
files.