Sublime Forum

Build command: lineNumberRegex question

#1

Hello,

I try to make a sqlplus Build System but doesn’t find a way to set something usable for lineNumberRegex:

I try this command that work fine:
window.runCommand(“exec ‘(?im)^()(\\d+)/(\\d+)’ echo show error | sqlplus -s DEVELOP/DEVELOP@MYDB @ ‘$File’”)

but the output is something like:


ERROR in package XXX

10/1 No var named XXX
50/10 Unknow command


So there is noway to find the filename for the first part of the regex of lineNumberRegex.

Is there a way to tell the build/exec command that the file is always the current file ($File) whatever the lineNumberRegex return ?
And my second question is:
Why I need to put three ‘’ in my regex (’(?im)^()(\\d+)/(\\d+)’) ?

Thanks for your help.

Dominique

0 Likes

#2

Rather than using the exec command, I recommended making a .sublime-build file, as you won’t have as much trouble escaping the regex there.

The three capture groups in the regex are for the file name, line and column of the error message. You don’t need all three.

I don’t think there’s a way to indicate that the file name is not present in the output, and that it should be assumed to be the current file.

0 Likes

#3

Sure, the exec command was only used to find the right parameters.

Could I ask You to think about add it ?
Something like if the first group is empty -> use the $File variable.

Thanks.

Dominique

0 Likes