-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cycling through match errors #57
Conversation
build:error-match cycles through all locations found with the errorMatch regex. stderr is prioritized over stdout.
build:error-match-first (cmd-alt-h/ctrl-alt-h) jumps back to the first match error stderr is prioritized over stdout.
@@ -135,27 +137,63 @@ module.exports = { | |||
return value; | |||
}, | |||
|
|||
errorParse: function() { | |||
this.match = []; | |||
var regex = XRegExp(this.cmd.errorMatch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on the regex used the multiline flag possibly needs to be added. But for my quick and dirty test regex for g++ it is not needed.
This looks great. Would you mind adding some tests to this? |
I hope these tests are fine, it's the first time creating some for me. It tests cycling and wrap around and jumping to the first error match. I don't know why travis failed. In my own repo the build and test are without error. |
I just re-started the build. Seems as there was an outage in the travis service. |
Thanks you very much for this contribution. It will make an excellent addition to atom-build! |
Instead of only allowing to jump to the first location found by the given errorMatch regular expression, you can cycle through every error with build:error-match. At the end it loops around to the beginning.
build:error-match-first (cmd-alt-h) jumps directly back to the beginning.