From fad8d1cde253a5c0f7342e5e40469ec4e58fc836 Mon Sep 17 00:00:00 2001 From: Thomas Iguchi Date: Wed, 14 Jul 2021 07:45:07 -0700 Subject: [PATCH] Added support for changing Checkstyle rules file name (#1760) Resolves https://github.com/github/super-linter/issues/680 --- README.md | 3 ++- lib/linter.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d844951..e4954492 100644 --- a/README.md +++ b/README.md @@ -282,8 +282,9 @@ But if you wish to select or exclude specific linters, we give you full control | **FILTER_REGEX_INCLUDE** | `all` | Regular expression defining which files will be processed by linters (ex: `.*src/.*`) | | **GITHUB_DOMAIN** | `github.com` | Specify a custom Github domain in case Github Enterprise is used: e.g. `github.myenterprise.com` | | **GITHUB_CUSTOM_API_URL** | `api.github.com` | Specify a custom Github API URL in case Github Enterprise is used: e.g. `https://github.myenterprise.com/api/v3/` | -| **IGNORE_GENERATED_FILES** | `false` | If set to `true`, super-linter will ignore all the files with `@generated` marker but without `@not-generated` marker. | +| **IGNORE_GENERATED_FILES** | `false` | If set to `true`, super-linter will ignore all the files with `@generated` marker but without `@not-generated` marker. | | **IGNORE_GITIGNORED_FILES** | `false` | If set to `true`, super-linter will ignore all the files that are ignored by Git. | +| **JAVA_FILE_NAME** | `sun-checks.xml` | Filename for [Checkstyle configuration](https://checkstyle.sourceforge.io/config.html) (ex: `checkstyle.xml`) | | **JAVASCRIPT_ES_CONFIG_FILE** | `.eslintrc.yml` | Filename for [eslint configuration](https://eslint.org/docs/user-guide/configuring#configuration-file-formats) (ex: `.eslintrc.yml`, `.eslintrc.json`) | | **JAVASCRIPT_DEFAULT_STYLE** | `standard` | Flag to set the default style of javascript. Available options: **standard**/**prettier** | | **JSCPD_CONFIG_FILE** | `.jscpd.json` | Filename for JSCPD configuration | diff --git a/lib/linter.sh b/lib/linter.sh index d9290063..feccc095 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -100,7 +100,7 @@ GROOVY_FILE_NAME=".groovylintrc.json" # shellcheck disable=SC2034 # Variable is referenced indirectly HTML_FILE_NAME=".htmlhintrc" # shellcheck disable=SC2034 # Variable is referenced indirectly -JAVA_FILE_NAME="sun_checks.xml" +JAVA_FILE_NAME="${JAVA_FILE_NAME:-sun_checks.xml}" # shellcheck disable=SC2034 # Variable is referenced indirectly JAVASCRIPT_ES_FILE_NAME="${JAVASCRIPT_ES_CONFIG_FILE:-.eslintrc.yml}" # shellcheck disable=SC2034 # Variable is referenced indirectly