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

Make commandline 'rock' invocation with FAIL notices return 1 to the shell. #175

Closed
emauton opened this issue Nov 19, 2014 · 4 comments
Closed

Comments

@emauton
Copy link
Contributor

emauton commented Nov 19, 2014

The git-hook command already does this:
https://github.com/inaka/elvis/blob/master/src/elvis.erl#L96

I want to use 'elvis rock' with my (separate, post-commit) continuous integration system. I can work around it, but having it fail (from the shell's point of view) would help, and seems the Right Way.

Looking at the code, the proper way to do it is uncertain. Are you comfortable with halting on failure & not processing any more commands in process_options([rock | ...], ...)?
https://github.com/inaka/elvis/blob/master/src/elvis.erl#L194

@elbrujohalcon
Copy link
Member

Yeah, @emauton I think that halting there is correct. Would you like to submit a PR with the change?

@emauton
Copy link
Contributor Author

emauton commented Nov 19, 2014

OK, thanks. I'll do a PR for it.

@emauton
Copy link
Contributor Author

emauton commented Nov 19, 2014

This is working perfectly in my CI build now. Thanks very much!

@emauton emauton closed this as completed Nov 19, 2014
@jfacorro
Copy link
Contributor

@emauton Awesome. Thank you for the PR!

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

No branches or pull requests

3 participants