So I've been following the
guide for Sublime. At some point we are supposed to create a build script for Sublime that calls the .bat file:
| {
"shell_cmd": "build",
"file_regex": "^ *([A-z]:.*)[(]([0-9]+)[)]"
}
|
According to that guide I should be able to cycle between errors with F4. But this requires the file_regex in the build script above to work on the output cl.exe generates. And this is where I hit a wall. The best regex I could write was:
| ^(..[A-z0-9_.]*)\n.*[(]([0-9]*)
|
which can catch exactly 1 error. The first group catches the file name, the second catches the line number.
Does anyone have a working regex for cl.exe output?
For reference, here is some output of my build:
| win32_proceduralmusic.cpp
..\win32_proceduralmusic.cpp(62) : error C2065: 'CS_USEDEFAULT' : undeclared identifier
..\win32_proceduralmusic.cpp(63) : error C2065: 'CS_USEDEFAULT' : undeclared identifier
..\win32_proceduralmusic.cpp(64) : error C2065: 'CS_USEDEFAULT' : undeclared identifier
..\win32_proceduralmusic.cpp(65) : error C2065: 'CS_USEDEFAULT' : undeclared identifier
..\win32_proceduralmusic.cpp(72) : error C2059: syntax error : '='
[Finished in 0.4s]
|
EDIT: Getting closer. I randomly deleted part of the regex, and now I'm matching all errors. They also get highlighted. But when I use F4 to cycle between them, It opens a different file which is at W:\in32_proceduralmusic.cpp instead of W:\win32_proceduralmusic.cpp.