notslang / editorconfig-tools

Tools for verifying/fixing code style based on an EditorConfig file
https://npmjs.com/package/editorconfig-tools
GNU General Public License v3.0
54 stars 6 forks source link

the `trim_trailing_whitespace` rule behaves inexactly #39

Open kerryChen95 opened 6 years ago

kerryChen95 commented 6 years ago

According to editorconfig.org:

trim_trailing_whitespace: set to true to remove any whitespace characters preceding newline characters and false to ensure it doesn't.

I think when I set .editorconfig like below:

[*.md]
trim_trailing_whitespace = false

and my README.md look like:

a line trailing with two spaces  
balabala

Notice that first line is trailing with two spaces.

I think trim_trailing_whitespace = false means we can trailing or not trailing whitespaces, not means that we must trailing whitespaces, so my case should be valid.

But editorconfig-tools say README.md failed trim_trailing_whitespace on line 1: found setting 'true', should be 'false'