This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/test_perlcritic_showrules.vader
Steven Humphrey 99263bdda4 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
2017-06-11 21:13:47 +01:00

16 lines
435 B
Text

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