Skip to content

Commit

Permalink
fix: JVM options for Couriser
Browse files Browse the repository at this point in the history
google-java-formatter-jdk11 was returning an error for --java-opt. Changed to the -J syntax which passed for JDK 11, 16 and 17.

Fixes: #8
  • Loading branch information
dustin committed Mar 11, 2023
1 parent e7e2184 commit b9a8dea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
name: Google Java Formatter
description: "Runs the Google Java Formatter on Java source files. Minimum supported runtime version is JDK 11."
language: coursier
entry: google-java-format-jdk11 --java-opt --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
entry: google-java-format-jdk11 -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
files: \.java$
require_serial: true
- id: ktlint
Expand Down

0 comments on commit b9a8dea

Please sign in to comment.