I started writing a plugin for SublimeLinter and so far the linting itself is working. However, I haven't managed to get highlighting to work. Since my linter (which is actually a compiler) does not output column, I'd be happy if the failing lines would be highlighted.
The relevant portion in linter.py
reads like this:
regex = (
r'Error in script \".+?\" on line (?P<line>\d+) -- aborting creation process'
)
multiline = True
line_col_base = (1, 1)
An example error from the linter executable looks like this:
Invalid command: Naem
Error in script "/Users/testuser/Desktop/lint-test.nsi" on line 5 -- aborting creation process
I don't know how SublimeLinter can make use of the error message, so I'd be happy getting the line part right for now.
Edit: According to the comment below I tried to make use of near
, but due to scarce documentation and no examples, I still haven't managed to find a solution. My updated regex pattern:
regex = (
r'Invalid command\: (?P<near>\w+)'
r'Error in script \"(.+?)\" on line (?P<line>\d+) -- aborting creation process'
)
Even though this would only capture misspelled commands, an answer could make it easier for me to understand how to properly capture output.