editorconfig-maven-plugin
editorconfig-maven-plugin is a Maven plugin for checking whether project files comply with format rules
defined in .editorconfig files and eventually also for fixing the violations.
|
|
editorconfig-maven-plugin is new. Expect issues of all kinds which is not to say that you should not
report them :)
|
Basic usage
editorconfig-maven-plugin requires Java 8+ and Maven 3.3.1+.
To make the build fail if any of your source files does not comply with .editorconfig rules, add the following to your project:
<groupId>org.ec4j.mavengroupId>
<artifactId>editorconfig-maven-pluginartifactId>
<version>0.2.0version>
<executions>
<execution>
<id>checkid>
<phase>verifyphase>
<goals>
<goal>checkgoal>
goals>
execution>
executions>
<configuration>
<excludes>
<exclude>src/main/**/*.whateverexclude>
excludes>
configuration>
plugin>
In case any violations are detected, you may want to fix them automagically by running
Configuration
See editorconfig:check and editorconfig:format.
How it works
editorconfig-maven-plugin is designed around the Linter interface.
Linter
is a processor specialized for some particular file format (such as YAML or XML) for which it can detect whether some
particular .editorconfig properties are satisfied and eventually propose a
fix that can
be applied automatically.
editorconfig-maven-plugin| Class name | Default includes | Default excludes | Supported .editorconfig properties |
|---|---|---|---|
|
|||
|
Contributions of further Linters are highly welcome! Please open an issue when you start working on something to avoid duplicate work.
How to build
Prerequisites:
-
Java 8+
-
Optionally Maven 3.5.0+, unless you want to use
./mvnwormvnw.batdelivered by the project
The most common build with unit tests:
On Windows:
Misc.
-
All code and contributions are under Apache License
-
Issues and Discussions: https://github.com/ec4j/editorconfig-maven-plugin/issues