mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
fix phpstan: use configured level 0 (#5053)
Use configured g:ale_php_phpstan_level if it is 0 (as a number rather than string). 0 (number) is considered to be empty, but '0' (string) is not.
This commit is contained in:
@@ -59,6 +59,13 @@ Execute(project with level set to 3):
|
||||
AssertLinter 'phpstan',
|
||||
\ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -l ' . ale#Escape('3') . ' %s'
|
||||
|
||||
Execute(project with level set to 0):
|
||||
call ale#test#SetFilename('phpstan-test-files/foo/test.php')
|
||||
let g:ale_php_phpstan_level = 0
|
||||
|
||||
AssertLinter 'phpstan',
|
||||
\ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -l ' . ale#Escape('0') . ' %s'
|
||||
|
||||
Execute(Custom phpstan configuration file):
|
||||
let g:ale_php_phpstan_configuration = 'phpstan_config'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user