external tool output filter for Google Closure Compiler

I'm using WebStorm with Google Closure Compiler and I'd like to use the external tool output filter feature to be able to click on a warning or error to jump straight to the appropriate line in the source code.

The output of the compiler looks like this:

F:\Dropbox\Work\projects\html\closurebuilder.bat
filevision\ui\field\GaugeChartField.js:220: WARNING - initializing variable
found   : string
required: number
var /** @type {number} */ n = e.response;
                              ^

0 error(s), 1 warning(s), 97.9% typed

Process finished with exit code 0



I've tried lots of output filters:

$FILE_PATH$:$LINE$:
$FILE_PATH$:$LINE$:.*
^$FILE_PATH$:$LINE$:.*$


but it never turns into a hyperlink.


Can anyone see what I'm doing wrong with the output filter, or are there any examples?  I've searched and not found any...
2 comments
Comment actions Permalink

the problem is that the Closure Compiler output doesn't include a full path to file, that's why it can't be matched using $FILE_PATH$.
Related ticket: https://youtrack.jetbrains.com/issue/IDEABKL-446.

I can suggest trying File watchers instead - similar problem is resolved there. Suggested filter is

$FILE_PATH$:$LINE$: $MESSAGE$$

it works for me when using closure compiler as a file watcher. You can configure your .bat file as a file watcher and use this filter... To have a watcher run not on each change, but on explicit Save All action, turn 'Immediate synchronization' off



Attachment(s):
closure.png
output.png
0
Comment actions Permalink

That works, but I don't think it's going to be a workable solution because it's running constantly (even with "Immediate file synchronization" off) and my project is big so it takes a long time to compile.

0

Please sign in to leave a comment.