summaryrefslogtreecommitdiff
path: root/ale_linters/php
diff options
context:
space:
mode:
authorPayton Swick <payton@foolord.com>2017-10-18 19:07:29 -0400
committerPayton Swick <payton@foolord.com>2017-10-26 12:22:08 -0400
commitaca66a54a5876eb9979e004742be6a8863c5cdf8 (patch)
tree1caadc9efafae9613138d720791025fca2f4b4fe /ale_linters/php
parent5292d2f3497604f526b05508d5891cf5d4b75c2b (diff)
downloadale-aca66a54a5876eb9979e004742be6a8863c5cdf8.zip
Include sniff code in message
Diffstat (limited to 'ale_linters/php')
-rw-r--r--ale_linters/php/phpcs.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/ale_linters/php/phpcs.vim b/ale_linters/php/phpcs.vim
index ddaf171e..399fbd23 100644
--- a/ale_linters/php/phpcs.vim
+++ b/ale_linters/php/phpcs.vim
@@ -29,11 +29,12 @@ function! ale_linters#php#phpcs#Handle(buffer, lines) abort
" Matches against lines like the following:
"
" /path/to/some-filename.php:18:3: error - Line indented incorrectly; expected 4 spaces, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
- let l:pattern = '^.*:\(\d\+\):\(\d\+\): \(.\+\) - \(.\+\) \(\(.\+\)\)$'
+ let l:pattern = '^.*:\(\d\+\):\(\d\+\): \(.\+\) - \(.\+\) (\(.\+\))$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
- let l:text = l:match[4]
+ let l:code = l:match[5]
+ let l:text = l:match[4] . ' (' . l:code . ')'
let l:type = l:match[3]
call add(l:output, {