From 12d8803015d5850d0e4f8fd0a713262b86a195d7 Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto Date: Sun, 4 Jul 2021 14:16:55 +0200 Subject: [PHP] PhpStan also looks for .dist config file (#3765) * [PHP] PhpStan also looks for .dist config file * Add tests --- test/linter/test_phpstan.vader | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/linter/test_phpstan.vader b/test/linter/test_phpstan.vader index 813fe448..9f73c18a 100644 --- a/test/linter/test_phpstan.vader +++ b/test/linter/test_phpstan.vader @@ -58,6 +58,16 @@ Execute(Configuration file exists in current directory): \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat raw %s' \ ] +Execute(Configuration dist file exists in current directory): + call writefile(['parameters:', ' level: 7'], './phpstan.neon.dist') + let g:ale_php_phpstan_level = '' + let g:ale_php_phpstan_configuration = '' + + AssertLinter 'phpstan', [ + \ ale#Escape('phpstan') . ' --version', + \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat raw %s' + \ ] + Execute(Configuration file exists in current directory, but force phpstan level): call writefile(['parameters:', ' level: 7'], './phpstan.neon') let g:ale_php_phpstan_configuration = '' -- cgit v1.2.3