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:
@@ -27,6 +27,10 @@ function! ale_linters#php#phpstan#GetCommand(buffer, version) abort
|
||||
|
||||
let l:level = ale#Var(a:buffer, 'php_phpstan_level')
|
||||
|
||||
if type(l:level) is v:t_number
|
||||
let l:level = string(l:level)
|
||||
endif
|
||||
|
||||
if empty(l:level) && empty(ale_linters#php#phpstan#FindConfigFile(a:buffer))
|
||||
" if no configuration file is found, then use 4 as a default level
|
||||
let l:level = '4'
|
||||
|
||||
Reference in New Issue
Block a user