gantsign / ktlint-maven-plugin

Maven plugin for ktlint the Kotlin linter
http://gantsign.com/ktlint-maven-plugin/
MIT License
60 stars 17 forks source link
kotlin ktlint maven maven-plugin

ktlint Maven Plugin

Release Maven Central codecov Known Vulnerabilities

This plugin provides the ability to use ktlint to format and check your source code against the ktlint anti-bikeshedding code style.

Using Java 17 and later

Java 17 is the first LTS release to enforce strong encapsulation. For ktlint to work we need to add --add-opens java.base/java.lang=ALL-UNNAMED to the JVM arguments.

We recommend that you add a .mvn/jvm.config file (relative to the top level project directory) to all of your projects using this plugin. The file should have the following contents:

--add-opens java.base/java.lang=ALL-UNNAMED

We also recommend adding this to all of your projects using this plugin and building with Java 11, as it'll suppress an illegal-access warning during the build.

For other options see: https://maven.apache.org/configure.html

Goals Overview

Usage

General instructions on how to use the ktlint plugin can be found on the usage page.

License

This software is licensed under the terms in the file named "LICENSE" in the root directory of this project. This project has dependencies that are under different licenses.

Author Information

John Freeman

GantSign Ltd. Company No. 06109112 (registered in England)