From 3f56c897a85fa2be5e763aab00a17010be31521a Mon Sep 17 00:00:00 2001 From: delfino <67192579+x-delfino@users.noreply.github.com> Date: Fri, 24 May 2024 15:12:39 +0100 Subject: [PATCH] feat: support for `POWERSHELL_CONFIG_FILE` (#5674) --- README.md | 1 + lib/linter.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 520e1976..51238325 100644 --- a/README.md +++ b/README.md @@ -227,6 +227,7 @@ You can configure super-linter using the following environment variables: | **MULTI_STATUS** | `true` | A status API is made for each language that is linted to make visual parsing easier. | | **NATURAL_LANGUAGE_CONFIG_FILE** | `.textlintrc` | Filename for [textlint configuration](https://textlint.github.io/docs/getting-started.html#configuration) (ex: `.textlintrc`) | | **PERL_PERLCRITIC_OPTIONS** | `null` | Additional arguments to pass to the command-line when running **perlcritic** (Example: --theme community) | +| **POWERSHELL_CONFIG_FILE** | `.powershell-psscriptanalyzer.psd1` | Filename for [PSScriptAnalyzer configuration](https://learn.microsoft.com/en-gb/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer) (ex: `.powershell-psscriptanalyzer.psd1`, `PSScriptAnalyzerSettings.psd1`) | | **PHP_CONFIG_FILE** | `php.ini` | Filename for [PHP Configuration](https://www.php.net/manual/en/configuration.file.php) (ex: `php.ini`) | | **PHP_PHPCS_FILE_NAME** | `phpcs.xml` | Filename for [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) (ex: `.phpcs.xml`, `.phpcs.xml.dist`) | | **PROTOBUF_CONFIG_FILE** | `.protolintrc.yml` | Filename for [protolint configuration](https://github.com/yoheimuta/protolint/blob/master/_example/config/.protolint.yaml) (ex: `.protolintrc.yml`) | diff --git a/lib/linter.sh b/lib/linter.sh index ebc5bdf3..90264dc8 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -212,7 +212,7 @@ PHP_PHPSTAN_FILE_NAME="phpstan.neon" # shellcheck disable=SC2034 # Variable is referenced indirectly PHP_PSALM_FILE_NAME="psalm.xml" # shellcheck disable=SC2034 # Variable is referenced indirectly -POWERSHELL_FILE_NAME=".powershell-psscriptanalyzer.psd1" +POWERSHELL_FILE_NAME="${POWERSHELL_CONFIG_FILE:-.powershell-psscriptanalyzer.psd1}" # shellcheck disable=SC2034 # Variable is referenced indirectly PROTOBUF_FILE_NAME="${PROTOBUF_CONFIG_FILE:-.protolintrc.yml}" # shellcheck disable=SC2034 # Variable is referenced indirectly