diff options
author | Steven Humphrey <shumphrey@users.noreply.github.com> | 2017-06-11 21:13:47 +0100 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2017-06-11 21:13:47 +0100 |
commit | 99263bdda446ec9c28ab92c3cafe8b166ac7fca8 (patch) | |
tree | 5fe88feff10c341315a3619df399a2b81e9a30a4 /test/test_perlcritic_showrules.vader | |
parent | 64ad51048d8f490b57ca6e74864f4de3777ec2a7 (diff) | |
download | ale-99263bdda446ec9c28ab92c3cafe8b166ac7fca8.zip |
Perlcritic column number and rule names (#640)
* Add column number to perlcritic linting output
This returns the column number of the perlcritic error so that ale can
show the column in addition to the line where perlcritic found an error.
* Add perlcritic configuration for rule names
This adds a configuration setting so that the name of the perlcritic
rule is shown [Rule::Name] after the error message.
This is useful to lookup the rule failure.
* Add a vader test for perlcritic#GetCommand
Diffstat (limited to 'test/test_perlcritic_showrules.vader')
-rw-r--r-- | test/test_perlcritic_showrules.vader | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_perlcritic_showrules.vader b/test/test_perlcritic_showrules.vader new file mode 100644 index 00000000..52089080 --- /dev/null +++ b/test/test_perlcritic_showrules.vader @@ -0,0 +1,16 @@ +Execute(no g:ale_perl_perlcritic_showrules): + silent noautocmd new testfile.pl + + let g:ale_perl_perlcritic_showrules = 0 + + AssertEqual + \ "perlcritic --verbose '". '%l:%c %m\n' . "' --nocolor", + \ ale_linters#perl#perlcritic#GetCommand(bufnr('')) + + let g:ale_perl_perlcritic_showrules = 1 + + AssertEqual + \ "perlcritic --verbose '". '%l:%c %m [%p]\n' . "' --nocolor", + \ ale_linters#perl#perlcritic#GetCommand(bufnr('')) + + :q |