- Notifications
You must be signed in to change notification settings - Fork13
A Maven plugin for checking whether project files comply with format rules defined in .editorconfig files and eventually also for fixing the violations
License
ec4j/editorconfig-maven-plugin
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
editorconfig-maven-plugin
is a Maven plugin for checking whether project files comply with format rulesdefined 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 notreport them :) |
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:
<plugin> <groupId>org.ec4j.maven</groupId> <artifactId>editorconfig-maven-plugin</artifactId> <version><!-- check the latest on http://search.maven.org/maven2/org/ec4j/maven/editorconfig-maven-plugin/--></version> <executions> <execution> <id>check</id> <phase>verify</phase> <goals> <goal>check</goal> </goals> </execution> </executions> <configuration><!-- See http://ec4j.github.io/editorconfig-maven-plugin/ for full configuration reference--> <excludes><!-- Note that maven submodule directories and many non-source file patterns are excluded by default--><!-- see https://github.com/ec4j/editorconfig-linters/blob/master/editorconfig-lint-api/src/main/java/org/ec4j/lint/api/Constants.java#L37--><!-- You can exclude further files from processing:--> <exclude>src/main/**/*.whatever</exclude> </excludes><!-- All files are included by default: <includes> <include>**</include> </includes>--> </configuration> </plugin>
In case any violations are detected, you may want to fix them automagically by running
mvn editorconfig:format
editorconfig-maven-plugin
is designed around the Linter interface.Linteris a processor specialized for some particular file format (such as YAML or XML) for which it can detect whether someparticular.editorconfig
properties are satisfied and eventually propose afix that canbe applied automatically.
editorconfig-maven-plugin
Class name | Default includes | Default excludes | Supported.editorconfig properties |
---|---|---|---|
| |||
|
Contributions of further Linters are highly welcome! Pleaseopen an issue when you start working on something to avoidduplicate work.
Prerequisites:
Java 8+
Optionally Maven 3.5.0+, unless you want to use
./mvnw
ormvnw.bat
delivered by the project
The most common build with unit tests:
./mvnw clean install
On Windows:
.\mvnw.cmd clean install
All code and contributions are underApache License
Issues and Discussions:https://github.com/ec4j/editorconfig-maven-plugin/issues
About
A Maven plugin for checking whether project files comply with format rules defined in .editorconfig files and eventually also for fixing the violations
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.