diff --git a/.automation/test/google_java_format/google_java_format_bad_1.java b/.automation/test/google_java_format/gjf_bad_1.java similarity index 100% rename from .automation/test/google_java_format/google_java_format_bad_1.java rename to .automation/test/google_java_format/gjf_bad_1.java diff --git a/.automation/test/google_java_format/google_java_format_bad_2.java b/.automation/test/google_java_format/gjf_bad_2.java similarity index 100% rename from .automation/test/google_java_format/google_java_format_bad_2.java rename to .automation/test/google_java_format/gjf_bad_2.java diff --git a/.automation/test/google_java_format/gjf_good_1.java b/.automation/test/google_java_format/gjf_good_1.java new file mode 100644 index 00000000..d067507e --- /dev/null +++ b/.automation/test/google_java_format/gjf_good_1.java @@ -0,0 +1,7 @@ +/** Represents a good Java file. */ +public static class JavaGood { + // Prints "Hello, World" to the terminal window. + private void helloWorld() { + System.out.println("Hello, World"); + } +} diff --git a/.automation/test/google_java_format/google_java_format_good_2.java b/.automation/test/google_java_format/gjf_good_2.java similarity index 99% rename from .automation/test/google_java_format/google_java_format_good_2.java rename to .automation/test/google_java_format/gjf_good_2.java index 376cef1f..6c0763c4 100644 --- a/.automation/test/google_java_format/google_java_format_good_2.java +++ b/.automation/test/google_java_format/gjf_good_2.java @@ -9,5 +9,4 @@ public class Application { public static void main(final String[] args) { SpringApplication.run(Application.class, args); } - } diff --git a/.automation/test/google_java_format/google_java_format_good_1.java b/.automation/test/google_java_format/google_java_format_good_1.java deleted file mode 100644 index 70f50e7c..00000000 --- a/.automation/test/google_java_format/google_java_format_good_1.java +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Represents a good Java file. -*/ -public static class JavaGood { - // Prints "Hello, World" to the terminal window. - private void helloWorld() { - System.out.println("Hello, World"); - } -} diff --git a/lib/linter.sh b/lib/linter.sh index 345c594e..683dfcb9 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -911,7 +911,7 @@ fi LINTER_COMMANDS_ARRAY['GITLEAKS']="gitleaks detect --no-banner --no-git -c ${GITLEAKS_LINTER_RULES} -v -s" LINTER_COMMANDS_ARRAY['GHERKIN']="gherkin-lint -c ${GHERKIN_LINTER_RULES}" LINTER_COMMANDS_ARRAY['GO']="golangci-lint run --fast -c ${GO_LINTER_RULES}" -LINTER_COMMANDS_ARRAY['GOOGLE_JAVA_FORMAT']="java -jar /usr/bin/google-java-format" +LINTER_COMMANDS_ARRAY['GOOGLE_JAVA_FORMAT']="java -jar /usr/bin/google-java-format --dry-run --set-exit-if-changed" LINTER_COMMANDS_ARRAY['GROOVY']="npm-groovy-lint -c ${GROOVY_LINTER_RULES} --failon warning --no-insight" LINTER_COMMANDS_ARRAY['HTML']="htmlhint --config ${HTML_LINTER_RULES}" LINTER_COMMANDS_ARRAY['JAVA']="java -jar /usr/bin/checkstyle -c ${JAVA_LINTER_RULES}"