This plugin provides the ability to use ktlint to format and check your source code against the ktlint anti-bikeshedding code style.
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.
I recommend you add this to the .mvn/jvm.config
in the root of any project
using this plugin.
--add-opens java.base/java.lang=ALL-UNNAMED
I also recommend adding this to any project using this plugin and building with Java 11, as it'll suppress an illegal-access warning during the build.
-
ktlint:format format your Kotlin sources using ktlint.
-
ktlint:check check your Kotlin sources for code style violations using ktlint.
-
ktlint:ktlint generate project report of code style violations using ktlint.
General instructions on how to use the ktlint plugin can be found on the usage page.
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.
John Freeman
GantSign Ltd. Company No. 06109112 (registered in England)