I am writing a compiler plugin for eslint. It mostly works, but I want to ignore some lines in the output and am unsure how.
I'm using the eslint "unix" format, which outputs errors like so:
/Users/chris/Sites/build/web/test.js:1:1: Use the function form of 'use strict'. [Error/strict]
/Users/chris/Sites/build/web/test.js:2:3: Unexpected console statement. [Warning/no-console]
2 problems
Notice the blank line and "2 problems" line at the bottom.
My errorformat is this: %f:%l:%c:\ %m
This works, except I get the blank line and the "2 problems" line in my quickfix list, like so.
test.js|1 col 1| Use the function form of 'use strict'. [Error/strict]
test.js|2 col 3| Unexpected console statement. [Warning/no-console]
||
|| 2 problems
Reading the errorformat help docs, I see I can ignore some pieces with %-
, but I'm unsure how to apply that to just blank lines or lines matching this "[number] problems" format.
Any help would be greatly appreciated. Thanks in advance!
%-G%.%#
as the last part oferrorformat
. As I understand it, it means "ignore all that match.*
. The other lines were already matched by previous parts.%-G%.%#
at the end of errorformat gives me this error:E377: Invalid %- in format string
.