Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.editorconfig file exclude when incorrect #11

Open
ezhov-da opened this issue Sep 22, 2020 · 0 comments
Open

.editorconfig file exclude when incorrect #11

ezhov-da opened this issue Sep 22, 2020 · 0 comments

Comments

@ezhov-da
Copy link

ezhov-da commented Sep 22, 2020

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 ezhov-da@617a30c

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant