diff options
author | Eddie Lebow <elebow@users.github.com> | 2017-11-11 15:15:19 -0500 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-11-12 10:56:53 +0000 |
commit | 365d023d0e5094b474b91d2ad72244ec5a13a08c (patch) | |
tree | 5b0a53c90f791a141fc486f5b624dc974013de9a | |
parent | 5df6ce6bb82e6a042eff644d77c71537e375114a (diff) | |
download | ale-365d023d0e5094b474b91d2ad72244ec5a13a08c.zip |
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.
-rw-r--r-- | ale_linters/perl/perlcritic.vim | 1 | ||||
-rw-r--r-- | test/handler/test_perlcritic_handler.vader | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/ale_linters/perl/perlcritic.vim b/ale_linters/perl/perlcritic.vim index df2f8b23..24f7eb86 100644 --- a/ale_linters/perl/perlcritic.vim +++ b/ale_linters/perl/perlcritic.vim @@ -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 diff --git a/test/handler/test_perlcritic_handler.vader b/test/handler/test_perlcritic_handler.vader new file mode 100644 index 00000000..f00b07da --- /dev/null +++ b/test/handler/test_perlcritic_handler.vader @@ -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' + \ ]) + |