My sublime-build file is this:
- Code: Select all
"cmd": ["make", "probuild"],
"file_regex": "(C:(.*?))\\(([0-9]+)\\) : error",
and here is the partial compiler output. The red text in the build output window is selected by ST on hitting F4:
[compilername:4288, C:\path\to\file\3506.clc(18) : error : ]
[compilername:4288, Syntax error]
(I know, that's weird output, but this is an in-house compiler)
So it seems that "(18)" is matched and it is the second group so I am expecting ST to pick that up as the line number. On hitting F4, ST opens the file if it's not already open and goes to the file if it is already open but does not move the cursor from where it already is. ST puts the cursor on line 1 if it opens the file. If I put [a-z] in there instead of [0-9] there is no match so that makes me believe that "(.*?)" isn't slurping up the line number as well.
I modeled the regex after D.sublime-build due to the line number being surrounded by parens and the grouping parens are inside that. I've verified that D.sublime-build does put the cursor on the correct error line, so I know ST works in this regard.
Does anyone see where my file_regex is wrong?