diff options
author | Edwin Huijsing <edwin.huijsing@2be-it.com> | 2024-02-22 03:55:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-22 11:55:52 +0900 |
commit | f38a80217282005e15305bfa37d051bb580b63a1 (patch) | |
tree | 63d2db2c99384f16e3f6816b143904ce72d81041 | |
parent | 52c6146751cda840fc6df66efe6a7c4ab3409223 (diff) | |
download | ale-f38a80217282005e15305bfa37d051bb580b63a1.zip |
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.
-rw-r--r-- | ale_linters/php/phpstan.vim | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ale_linters/php/phpstan.vim b/ale_linters/php/phpstan.vim index b0d2a8d3..a0942530 100644 --- a/ale_linters/php/phpstan.vim +++ b/ale_linters/php/phpstan.vim @@ -57,12 +57,14 @@ function! ale_linters#php#phpstan#Handle(buffer, lines) abort return l:output endif - for l:err in l:res.files[expand('#' . a:buffer .':p')].messages - call add(l:output, { - \ 'lnum': l:err.line, - \ 'text': l:err.message, - \ 'type': 'E', - \}) + for l:key in keys(l:res.files) + for l:err in l:res.files[l:key].messages + call add(l:output, { + \ 'lnum': l:err.line, + \ 'text': l:err.message, + \ 'type': 'E', + \}) + endfor endfor return l:output |