Ant tasks for checking whether project files comply with format rules defined in .editorconfig files and eventually also for fixing the violations
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.mvn/wrapper Add mvnw Sep 30, 2018
src
.gitignore Initial Sep 30, 2018
.travis.yml Add integration tests Oct 4, 2018
LICENSE Initial Sep 30, 2018
README.adoc Fix the Maven Central badge Oct 5, 2018
appveyor.yml Add integration tests Oct 4, 2018
mvnw Add mvnw Sep 30, 2018
mvnw.cmd Add mvnw Sep 30, 2018
pom.xml [maven-release-plugin] prepare for next development iteration Oct 4, 2018

README.adoc

editorconfig-ant-tasks

License Maven Central Travis CI build status AppVeyor Windows CI build status

editorconfig-ant-tasks provides Ant tasks for checking whether project files comply with format rules defined in .editorconfig files and eventually also for fixing the violations.

⚠️
editorconfig-ant-tasks are new. Expect issues of all kinds which is not to say that you should not report them :)

Basic usage

editorconfig-ant-tasks requires Java 7+ and Ant 1.8.0+.

Basic build.xml file:

<project name="editorconfig-example" basedir="." xmlns:ec4j="antlib:org.ec4j.ant">

  <taskdef uri="antlib:org.ec4j.ant" resource="org/ec4j/ant/antlib.xml">
    <classpath>
      <fileset dir="...">
        <include name="editorconfig-ant-tasks-*.jar"/>
        <include name="libs/*.jar"/>
      </fileset>
    </classpath>
  </taskdef>

  <target name="editorconfigCheck">
    <!-- This checks whether the source tree complies with the rules defined in the .editorconfig file -->
    <ec4j:editorconfigCheck />
  </target>

  <target name="editorconfigFormat">
    <!-- This fixes any violations against the rules defined in the .editorconfig file -->
    <ec4j:editorconfigFormat />
  </target>

</project>

To check whether any of your source files does not comply with .editorconfig rules run

ant editorconfigCheck

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

ant editorconfigFormat

Configuration

TODO

How to build

Prerequisites:

  • Java 7+

  • Optionally Maven 3.5.0+, unless you want to use ./mvnw or mvnw.bat delivered by the project

The most common build with unit tests:

./mvnw clean install

On Windows:

.\mvnw.cmd clean install

Misc.