mirror of https://github.com/dense-analysis/ale
perlcritic: all issues are warnings
Perlcritic is a style checker, not a syntax validator. This change was originally proposed by @RsrchBoy in https://github.com/w0rp/ale/pull/784.
This commit is contained in:
parent
9e7c493e7e
commit
4d44996af6
|
@ -61,6 +61,7 @@ function! ale_linters#perl#perlcritic#Handle(buffer, lines) abort
|
|||
\ 'lnum': l:match[1],
|
||||
\ 'col': l:match[2],
|
||||
\ 'text': l:match[3],
|
||||
\ 'type': 'W'
|
||||
\})
|
||||
endfor
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
Before:
|
||||
runtime ale_linters/perl/perlcritic.vim
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute(The Perl::Critic handler should create all issues as warnings):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': '21',
|
||||
\ 'col': '17',
|
||||
\ 'text': 'Regular expression without "/m" flag',
|
||||
\ 'type': 'W',
|
||||
\ }
|
||||
\ ],
|
||||
\ ale_linters#perl#perlcritic#Handle(99, [
|
||||
\ '21:17 Regular expression without "/m" flag'
|
||||
\ ])
|
||||
|
Loading…
Reference in New Issue