Skip to content

Commit

Permalink
update README.md for JDK 16+ issues (#1573)
Browse files Browse the repository at this point in the history
  • Loading branch information
agebhar1 authored Nov 21, 2022
1 parent d39973f commit 26f957d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ $ ./ktlint -R diktat.jar --disabled_rules=standard "dir/your/dir/**/*.kt"
To **autofix** all code style violations, use `-F` option.

## Run with Maven using diktat-maven-plugin
:heavy_exclamation_mark: If you are using **Java 16+**, you need to add `--add-opens java.base/java.util=ALL-UNNAMED` flag to the JVM. For more information, see: https://github.com/pinterest/ktlint/issues/1195
:heavy_exclamation_mark: If you are using **Java 16+**, you need to add `--add-opens java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED` flag to the JVM. For more information, see: https://github.com/pinterest/ktlint/issues/1195
This can be done by setting `MAVEN_OPTS` variable:

```
export MAVEN_OPTS="--add-opens java.base/java.util=ALL-UNNAMED"
export MAVEN_OPTS="--add-opens java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED"
```

This plugin is available since version 0.1.3. You can see how it is configured in our project for self-checks: [pom.xml](pom.xml).
Expand Down

0 comments on commit 26f957d

Please sign in to comment.