Skip to content
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

Merged
merged 4 commits into from
Apr 19, 2015
Merged

Cycling through match errors #57

merged 4 commits into from
Apr 19, 2015

Conversation

5n8ke
Copy link
Contributor

@5n8ke 5n8ke commented Apr 16, 2015

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.

5n8ke added 3 commits April 17, 2015 00:56
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);
Copy link
Contributor Author

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.

@noseglid
Copy link
Owner

This looks great. Would you mind adding some tests to this?

@5n8ke
Copy link
Contributor Author

5n8ke commented Apr 17, 2015

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.

@noseglid
Copy link
Owner

I just re-started the build. Seems as there was an outage in the travis service.

@noseglid
Copy link
Owner

Thanks you very much for this contribution. It will make an excellent addition to atom-build!
It will be included in the next version (v0.29.0).

noseglid added a commit that referenced this pull request Apr 19, 2015
Cycling through match errors
@noseglid noseglid merged commit be61062 into noseglid:master Apr 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants