Home Download Buy Blog Forum Support

Build command: lineNumberRegex question

Build command: lineNumberRegex question

Postby bizoo on Wed Dec 08, 2010 4:32 pm

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
bizoo
 
Posts: 883
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Build command: lineNumberRegex question

Postby jps on Thu Dec 09, 2010 7:53 am

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.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Build command: lineNumberRegex question

Postby bizoo on Thu Dec 09, 2010 9:04 am

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.


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

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.


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

Thanks.

Dominique
bizoo
 
Posts: 883
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 14 guests