feat: add env var for npm-groovy-lint failon level (#6530)
Some checks are pending
Publish Images / Build and Test (push) Waiting to run
Publish Images / Release (push) Blocked by required conditions
Build and Test / Set build metadata (push) Waiting to run
Build and Test / Build and Test (push) Blocked by required conditions
Build and Test / Test the Super-linter GitHub Action (push) Blocked by required conditions
Build and Test / Build test suite matrix (push) Waiting to run
Build and Test / Run test cases (push) Blocked by required conditions
Build and Test / Check if all the tests passed (push) Blocked by required conditions
Build and Test / preview-release-notes (push) Waiting to run
Lint commit / commitlint (push) Waiting to run

This commit is contained in:
Alexander Schmidt 2025-03-04 21:13:33 +01:00 committed by GitHub
parent d349d57576
commit 418c922120
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 1 deletions

View file

@ -285,6 +285,7 @@ You can configure Super-linter using the following environment variables:
| **GITLEAKS_CONFIG_FILE** | `.gitleaks.toml` | Filename for [GitLeaks configuration](https://github.com/zricethezav/gitleaks#configuration) (ex: `.gitleaks.toml`) | | **GITLEAKS_CONFIG_FILE** | `.gitleaks.toml` | Filename for [GitLeaks configuration](https://github.com/zricethezav/gitleaks#configuration) (ex: `.gitleaks.toml`) |
| **GITLEAKS_LOG_LEVEL** | Gitleaks default log level | Gitleaks log level. Defaults to the Gitleaks default log level. | | **GITLEAKS_LOG_LEVEL** | Gitleaks default log level | Gitleaks log level. Defaults to the Gitleaks default log level. |
| **GO_CONFIG_FILE** | `.golangci.yml` | Filename for [golangci-lint configuration](https://golangci-lint.run/usage/configuration/) (ex: `.golangci.toml`) | | **GO_CONFIG_FILE** | `.golangci.yml` | Filename for [golangci-lint configuration](https://golangci-lint.run/usage/configuration/) (ex: `.golangci.toml`) |
| **GROOVY_FAILON_LEVEL** | `warning` | npm-groovy-lint failon level. |
| **IGNORE_GENERATED_FILES** | `false` | If set to `true`, super-linter will ignore all the files with `@generated` marker but without `@not-generated` marker. Jscpd and Checkov ignore this variable. Use their include and ignore features to select or ignore the files to lint. | | **IGNORE_GENERATED_FILES** | `false` | If set to `true`, super-linter will ignore all the files with `@generated` marker but without `@not-generated` marker. Jscpd and Checkov ignore this variable. Use their include and ignore features to select or ignore the files to lint. |
| **IGNORE_GITIGNORED_FILES** | `false` | If set to `true`, super-linter will ignore all the files that are ignored by Git. Checkov ignores this variable. Use its include and ignore features to select or ignore the files to lint. | | **IGNORE_GITIGNORED_FILES** | `false` | If set to `true`, super-linter will ignore all the files that are ignored by Git. Checkov ignores this variable. Use its include and ignore features to select or ignore the files to lint. |
| **JAVA_FILE_NAME** | `sun_checks.xml` | Filename for [Checkstyle configuration](https://checkstyle.sourceforge.io/config.html). Checkstyle embeds several configuration files, such as `sun_checks.xml`, `google_checks.xml` that you can use without providing your own configuration file. | | **JAVA_FILE_NAME** | `sun_checks.xml` | Filename for [Checkstyle configuration](https://checkstyle.sourceforge.io/config.html). Checkstyle embeds several configuration files, such as `sun_checks.xml`, `google_checks.xml` that you can use without providing your own configuration file. |

View file

@ -166,7 +166,7 @@ LINTER_COMMANDS_ARRAY_GO_MODULES=(golangci-lint run --allow-parallel-runners -c
LINTER_COMMANDS_ARRAY_GO_RELEASER=(goreleaser check) LINTER_COMMANDS_ARRAY_GO_RELEASER=(goreleaser check)
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)
LINTER_COMMANDS_ARRAY_GRAPHQL_PRETTIER=("${PRETTIER_COMMAND[@]}") LINTER_COMMANDS_ARRAY_GRAPHQL_PRETTIER=("${PRETTIER_COMMAND[@]}")
LINTER_COMMANDS_ARRAY_GROOVY=(npm-groovy-lint -c "${GROOVY_LINTER_RULES}" --failon warning --no-insight) LINTER_COMMANDS_ARRAY_GROOVY=(npm-groovy-lint -c "${GROOVY_LINTER_RULES}" --failon "${GROOVY_FAILON_LEVEL}" --no-insight)
LINTER_COMMANDS_ARRAY_HTML=(htmlhint --config "${HTML_LINTER_RULES}") LINTER_COMMANDS_ARRAY_HTML=(htmlhint --config "${HTML_LINTER_RULES}")
LINTER_COMMANDS_ARRAY_HTML_PRETTIER=("${PRETTIER_COMMAND[@]}") LINTER_COMMANDS_ARRAY_HTML_PRETTIER=("${PRETTIER_COMMAND[@]}")
LINTER_COMMANDS_ARRAY_JAVA=(java -jar /usr/bin/checkstyle -c "${JAVA_LINTER_RULES}") LINTER_COMMANDS_ARRAY_JAVA=(java -jar /usr/bin/checkstyle -c "${JAVA_LINTER_RULES}")

View file

@ -145,6 +145,10 @@ declare -l ENFORCE_COMMITLINT_CONFIGURATION_CHECK
ENFORCE_COMMITLINT_CONFIGURATION_CHECK="${ENFORCE_COMMITLINT_CONFIGURATION_CHECK:-"false"}" ENFORCE_COMMITLINT_CONFIGURATION_CHECK="${ENFORCE_COMMITLINT_CONFIGURATION_CHECK:-"false"}"
export ENFORCE_COMMITLINT_CONFIGURATION_CHECK export ENFORCE_COMMITLINT_CONFIGURATION_CHECK
declare GROOVY_FAILON_LEVEL
GROOVY_FAILON_LEVEL="${GROOVY_FAILON_LEVEL:-"warning"}"
export GROOVY_FAILON_LEVEL
# Define private output paths early because cleanup depends on those being defined # Define private output paths early because cleanup depends on those being defined
DEFAULT_SUPER_LINTER_OUTPUT_DIRECTORY_NAME="super-linter-output" DEFAULT_SUPER_LINTER_OUTPUT_DIRECTORY_NAME="super-linter-output"
SUPER_LINTER_OUTPUT_DIRECTORY_NAME="${SUPER_LINTER_OUTPUT_DIRECTORY_NAME:-${DEFAULT_SUPER_LINTER_OUTPUT_DIRECTORY_NAME}}" SUPER_LINTER_OUTPUT_DIRECTORY_NAME="${SUPER_LINTER_OUTPUT_DIRECTORY_NAME:-${DEFAULT_SUPER_LINTER_OUTPUT_DIRECTORY_NAME}}"

View file

@ -24,11 +24,14 @@ BASH_EXEC_IGNORE_LIBRARIES="false"
# shellcheck disable=SC2034 # shellcheck disable=SC2034
GITHUB_WORKSPACE="$(pwd)" GITHUB_WORKSPACE="$(pwd)"
# shellcheck disable=SC2034 # shellcheck disable=SC2034
GROOVY_FAILON_LEVEL="warning"
# shellcheck disable=SC2034
IGNORE_GITIGNORED_FILES="false" IGNORE_GITIGNORED_FILES="false"
# shellcheck disable=SC2034 # shellcheck disable=SC2034
TYPESCRIPT_STANDARD_TSCONFIG_FILE=".github/linters/tsconfig.json" TYPESCRIPT_STANDARD_TSCONFIG_FILE=".github/linters/tsconfig.json"
# shellcheck disable=SC2034 # shellcheck disable=SC2034
YAML_ERROR_ON_WARNING="false" YAML_ERROR_ON_WARNING="false"
for LANGUAGE in "${LANGUAGE_ARRAY_FOR_LINTER_RULES[@]}"; do for LANGUAGE in "${LANGUAGE_ARRAY_FOR_LINTER_RULES[@]}"; do
GetLinterRules "${LANGUAGE}" "TEMPLATES" GetLinterRules "${LANGUAGE}" "TEMPLATES"
done done