Fork me on GitHub


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 1.7+ and Maven ${project.prerequisites.maven}+.

To make the build fail if any of your source files does not comply with .editorconfig rules, add the following to your project:

        <!-- Note that maven submodule directories and many non-source file patterns are excluded by default -->
        <!-- - see
        <!-- You can exclude further files from processing: -->
      <!-- All files are included by default:

In case any violations are detected, you may want to fix them automagically by running

mvn 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.

Table 1. Linters available in editorconfig-maven-plugin
Class name Default includes Default excludes Supported .editorconfig properties



end_of_line, trim_trailing_whitespace, insert_final_newline


**/*.xml, **/*.xsl

indent_style, indent_size

Contributions of further Linters are highly welcome! Please open an issue when you start working on something to avoid duplicate work.