From 20c4df58c060cf122dce53b14ec578d48d921fb0 Mon Sep 17 00:00:00 2001 From: shabbir-genetech Date: Tue, 30 Jul 2024 19:27:25 +0500 Subject: [PATCH] feat: customize phpstan config file name (#5940) Co-authored-by: Demo user account --- README.md | 1 + lib/linter.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c2b41336..ebf1abe3 100644 --- a/README.md +++ b/README.md @@ -230,6 +230,7 @@ You can configure super-linter using the following environment variables: | **POWERSHELL_CONFIG_FILE** | `.powershell-psscriptanalyzer.psd1` | Filename for [PSScriptAnalyzer configuration](https://learn.microsoft.com/en-gb/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer) | | **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`) | +| **PHP_PHPSTAN_CONFIG_FILE** | `phpstan.neon` | Filename for [PHPStan Configuration](https://phpstan.org/config-reference) (ex: `phpstan.neon`) | | **PROTOBUF_CONFIG_FILE** | `.protolintrc.yml` | Filename for [protolint configuration](https://github.com/yoheimuta/protolint/blob/master/_example/config/.protolint.yaml) (ex: `.protolintrc.yml`) | | **PYTHON_BLACK_CONFIG_FILE** | `.python-black` | Filename for [black configuration](https://github.com/psf/black/blob/main/docs/guides/using_black_with_other_tools.md#black-compatible-configurations) (ex: `.isort.cfg`, `pyproject.toml`) | | **PYTHON_FLAKE8_CONFIG_FILE** | `.flake8` | Filename for [flake8 configuration](https://flake8.pycqa.org/en/latest/user/configuration.html) (ex: `.flake8`, `tox.ini`) | diff --git a/lib/linter.sh b/lib/linter.sh index eb6d23c0..206f80f0 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -221,7 +221,7 @@ PHP_BUILTIN_FILE_NAME="${PHP_CONFIG_FILE:-php.ini}" # shellcheck disable=SC2034 # Variable is referenced indirectly PHP_PHPCS_FILE_NAME="${PHP_PHPCS_FILE_NAME:-phpcs.xml}" # shellcheck disable=SC2034 # Variable is referenced indirectly -PHP_PHPSTAN_FILE_NAME="phpstan.neon" +PHP_PHPSTAN_FILE_NAME="${PHP_PHPSTAN_CONFIG_FILE:-phpstan.neon}" # shellcheck disable=SC2034 # Variable is referenced indirectly PHP_PSALM_FILE_NAME="psalm.xml" # shellcheck disable=SC2034 # Variable is referenced indirectly