editorconfig-gradle-plugin
editorconfig-gradle-plugin copied to clipboard
.editorconfig file exclude when incorrect
Hello. In my project, I used editorconfig-gradle-plugin. My project contains node_modules folder, that contains module define-properties with file .editorconfig.
root = true
[*]
indent_style = tab;
insert_final_newline = true;
quote_type = auto;
space_after_anonymous_functions = true;
space_after_control_statements = true;
spaces_around_operators = true;
trim_trailing_whitespace = true;
spaces_in_brackets = false;
end_of_line = lf;
When I run gradlew editorconfigCheck
, I catch Exception:
Execution failed for task ':node-app:editorconfigCheck'.
> There was a failure while executing work items
> A failure occurred while executing org.ec4j.gradle.runtime.EditorconfigInvoker
> Unexpected parsed "lf;" for enum org.ec4j.core.model.PropertyType$EndOfLineValue
I reproduced behavior in this repository https://github.com/ezhov-da/editorconfig-gradle-plugin/commit/617a30cee15fcf313f7aab10a4b7c4737158f1f8
I added incorrect file .editorconfig to src/test/projects/extension/src/main/resources/.editorconfig and run EditorconfigGradlePluginITest.checkExtension
test.
Do I understand correctly that such a configuration:
editorconfig {
excludes = mutableListOf (
"node_modules/ **",
)
}
will completely exclude from scanning both files - for check and .editorconfig in folder node_modules?.
How I can exclude only incorrectly .editorconfig from the execution if that many in node_modules subdirectories?
Thanks!