Disclaimer: I hope it’s okay to post this here, but neither my support request on the SublimeLinter repository, nor the my question on StackOverflow, was ever answered. I was hoping someone familiar with Sublime Text might be able to help.
A couple of months ago, I have released my first SublimeLinter plugin for makensis. It currently has limited functionality, since it only reports errors and no warnings. Commenting out one line and uncommenting another, I can make it work for warnings, but then it will not report errors.
regex = (
# r'(?P<warning>warning): (?P<message>.*) \(.*:(?P<line>\d+)\)'
r'(?P<message>[^\r?\n]+)\r?\n(?P<error>Error) in script "[^"]+" on line (?P<line>\d+) -- aborting creation process$'
)
I don’t know the technically correct term for this RegEx flavour, but the problem seems to be that I can’t use those named matches, e.g. (?P<message>.*), more than once, which is why a combined RegEx for errors and warnings does not work.
Can anybody explain to me how I can provide two patterns, one for errors and one for warnings?