mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
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:
@@ -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 = ''
|
||||
|
||||
Reference in New Issue
Block a user