mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-11 15:01:57 +08:00
Add file mapping to phpstan (#4685)
* PHPStan is now working with filename-mapping See help ale-lint-other-machines for more info about filename-mapping. * Add two tests to show and test what is expected * Missed this update while creating previous commit * Simplified the update We only needed to refactor the processing loop. No extra test are needed.
This commit is contained in:
@@ -57,13 +57,15 @@ function! ale_linters#php#phpstan#Handle(buffer, lines) abort
|
|||||||
return l:output
|
return l:output
|
||||||
endif
|
endif
|
||||||
|
|
||||||
for l:err in l:res.files[expand('#' . a:buffer .':p')].messages
|
for l:key in keys(l:res.files)
|
||||||
|
for l:err in l:res.files[l:key].messages
|
||||||
call add(l:output, {
|
call add(l:output, {
|
||||||
\ 'lnum': l:err.line,
|
\ 'lnum': l:err.line,
|
||||||
\ 'text': l:err.message,
|
\ 'text': l:err.message,
|
||||||
\ 'type': 'E',
|
\ 'type': 'E',
|
||||||
\})
|
\})
|
||||||
endfor
|
endfor
|
||||||
|
endfor
|
||||||
|
|
||||||
return l:output
|
return l:output
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user