jednano / eclint

Validate or fix code that doesn't adhere to EditorConfig settings or infer settings from existing code.
MIT License
305 stars 28 forks source link

EClint Check Skipping Some Files (indentation only) #215

Open tajmone opened 4 years ago

tajmone commented 4 years ago

I use EClint in many repositories and I've noticed on many occasions that eclint check failes to validate some file when the pattern definitions are too long (at least locally, under Win 10).

Using:

I'm not sure if this is due to some bug in how ECLint build hand handles all the rules extracted from the .editorconfing file, or if it's a Win OS specific problem.

I have the impression that this validation failure tends to occur when there's only a single file matching the pattern.

I've tried to isolate the problem by tweaking the .editorconfing file and I've ultimately came to the conclusion that the issue only affects indentation checks when there's a single file matching the pattern.

As an example, with these .editorconfing settings:

## Gradle
#########
[*.{gradle,properties}]
charset = utf-8
end_of_line = unset
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
[*.properties]
indent_size = unset
[*.gradle]
indent_size = 2

Wrong indentantion in build.gradle (the only .gradle file present) is never catched (other feature work); but if I create a copy of the file (eg. xxx.gradle) then eclint check will detect the error in the added copy, but not the original file. For some reason, the first file is always being ingored.

The problem shows up both in CMD and Bash for Windows.

Anyone experienced this same problem? Any suggestions and fixes?