File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,10 @@ function! ale_linters#php#phpstan#FindConfigFile(buffer) abort
8787 let l: result = ale#path#FindNearestFile (a: buffer , ' phpstan.neon.dist' )
8888 endif
8989
90+ if empty (l: result )
91+ let l: result = ale#path#FindNearestFile (a: buffer , ' phpstan.dist.neon' )
92+ endif
93+
9094 return l: result
9195endfunction
9296
Original file line number Diff line number Diff line change @@ -102,6 +102,17 @@ Execute(Configuration dist file exists in current directory):
102102 \ ]
103103 AssertLinterCwd g:dir
104104
105+ Execute(Configuration alternative dist file exists in current directory):
106+ call writefile(['parameters:', ' level: 7'], './phpstan.dist.neon')
107+ let g:ale_php_phpstan_level = ''
108+ let g:ale_php_phpstan_configuration = ''
109+
110+ AssertLinter 'phpstan', [
111+ \ ale#Escape('phpstan') . ' --version',
112+ \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json %s'
113+ \ ]
114+ AssertLinterCwd g:dir
115+
105116Execute(Configuration file exists in current directory, but force phpstan level):
106117 call writefile(['parameters:', ' level: 7'], './phpstan.neon')
107118 let g:ale_php_phpstan_configuration = ''
You can’t perform that action at this time.
0 commit comments