phpstan: support config phpstan.dist.neon (#5052)

phpstan will load config from (in order) phpstan.neon, phpstan.neon.dist, or
phpstan.dist.neon.
This commit is contained in:
Bill Ruddock
2025-10-26 06:55:40 +00:00
committed by GitHub
parent 21d5de18b2
commit 59c6b4f7b0
2 changed files with 15 additions and 0 deletions

View File

@@ -102,6 +102,17 @@ Execute(Configuration dist file exists in current directory):
\ ]
AssertLinterCwd g:dir
Execute(Configuration alternative dist file exists in current directory):
call writefile(['parameters:', ' level: 7'], './phpstan.dist.neon')
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 json %s'
\ ]
AssertLinterCwd g:dir
Execute(Configuration file exists in current directory, but force phpstan level):
call writefile(['parameters:', ' level: 7'], './phpstan.neon')
let g:ale_php_phpstan_configuration = ''