ec4j / editorconfig-maven-plugin

A Maven plugin for checking whether project files comply with format rules defined in .editorconfig files and eventually also for fixing the violations
Apache License 2.0
54 stars 13 forks source link

Disable the check for single mvn calls #67

Closed Tockra closed 2 years ago

Tockra commented 2 years ago

Hi,

I wanted to ask if there is any possibility to prevent the check while running mvn install. Our pipeline needs to do this call, but in between the pipeline created files, which will be checked by the editorconfig:check call. This check fails because the generated files doesn't follow a specified rules. It would be hard to exclude these files, because they will be generated in folders which already have checked files and the file names are not predictable.

I'm looking for a parameter like -DSkipTests. Just for the editorconfig plugin. Something like mvn clean install -DskipChecks .

T

ppalaga commented 2 years ago

It sounds like you look for -Deditorconfig.failOnFormatViolation=false

https://github.com/ec4j/editorconfig-maven-plugin/blob/master/editorconfig-maven-plugin/src/main/java/org/ec4j/maven/EditorConfigCheckMojo.java#L37-L45