Goals available for this plugin:
| Goal | Report? | Description |
|---|---|---|
| ktlint:check | No | Checks for violations of the code style. |
| ktlint:format | No | Automatically fixes violations of the code style (when possible). |
| ktlint:help | No | Display help information on ktlint-maven-plugin. Call mvn ktlint:help -Ddetail=true
-Dgoal=<goal-name> to display parameter details. |
| ktlint:ktlint | Yes | A reporting task that performs ktlint analysis and
generates a HTML report on any violations that ktlint
finds. |
The following specifies the minimum requirements to run this Maven plugin:
| Maven | 3.5.4 |
| JDK | Default target for maven-compiler-plugin version 3.11.0 |
| Memory | No minimum requirement. |
| Disk Space | No minimum requirement. |
You should specify the version in your project's plugin configuration:
<project>
...
<build>
<!-- To define the plugin version in your parent POM -->
<pluginManagement>
<plugins>
<plugin>
<groupId>com.github.gantsign.maven</groupId>
<artifactId>ktlint-maven-plugin</artifactId>
<version>3.5.0</version>
</plugin>
...
</plugins>
</pluginManagement>
<!-- To use the plugin goals in your POM or parent POM -->
<plugins>
<plugin>
<groupId>com.github.gantsign.maven</groupId>
<artifactId>ktlint-maven-plugin</artifactId>
<version>3.5.0</version>
</plugin>
...
</plugins>
</build>
...
<!-- To use the report goals in your POM or parent POM -->
<reporting>
<plugins>
<plugin>
<groupId>com.github.gantsign.maven</groupId>
<artifactId>ktlint-maven-plugin</artifactId>
<version>3.5.0</version>
</plugin>
...
</plugins>
</reporting>
...
</project>
For more information, see "Guide to Configuring Plug-ins"