diff --git a/README.md b/README.md index 8001e749..b817f997 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Developers on **GitHub** can call the **GitHub Action** to lint their code base | **JavaScript** | [eslint](https://eslint.org/) [standard js](https://standardjs.com/) | | **JSON** | [jsonlint](https://github.com/zaach/jsonlint) | | **CSS** | [stylelint](https://stylelint.io/) | -| **Java** | [Spotless](https://github.com/diffplug/spotless) | +| **Java** | [checkstyle](https://checkstyle.org) | | **Kotlin** | [ktlint](https://github.com/pinterest/ktlint) | | **Markdown** | [markdownlint](https://github.com/igorshubovych/markdownlint-cli#readme) | | **OpenAPI** | [spectral](https://github.com/stoplightio/spectral) | diff --git a/lib/linter.sh b/lib/linter.sh index 386ee9e6..8119313f 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -94,7 +94,7 @@ LINTER_ARRAY=("jsonlint" "yamllint" "xmllint" "markdownlint" "shellcheck" "pylint" "perl" "raku" "rubocop" "coffeelint" "eslint" "standard" "ansible-lint" "dockerfilelint" "golangci-lint" "tflint" "stylelint" "dotenv-linter" "pwsh" "arm-ttk" "ktlint" "protolint" "clj-kondo" - "spectral" "cfn-lint" "dart" "htmlhint" "spotless") + "spectral" "cfn-lint" "dart" "htmlhint" "checkstyle") ############################# # Language array for prints # @@ -940,7 +940,7 @@ Footer() { ############################### # Exit with 1 if errors found # ############################### - + elif [ "${ERRORS_FOUND_YML}" -ne 0 ] || [ "${ERRORS_FOUND_JSON}" -ne 0 ] || [ "${ERRORS_FOUND_XML}" -ne 0 ] || @@ -1373,7 +1373,7 @@ if [ "$VALIDATE_JAVA" == "true" ]; then # Lint the JAVA files # ####################### # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "JAVA" "spotless" "spotless" ".*\.\(java\)\$" "${FILE_ARRAY_JAVA[@]}" + LintCodebase "JAVA" "checkstyle" "java -jar /usr/bin/checksytle.jar" ".*\.\(java\)\$" "${FILE_ARRAY_JAVA[@]}" fi ##################