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

Have error exit code if any internal problems occur #1235

Open
mvz opened this issue Jul 19, 2017 · 3 comments
Open

Have error exit code if any internal problems occur #1235

mvz opened this issue Jul 19, 2017 · 3 comments
Labels

Comments

@mvz
Copy link
Collaborator

mvz commented Jul 19, 2017

While investigating #1081, I noticed Reek can still exit with a success code when it has already printed an error stack trace. I think we should always exit with an error in that case.

@mvz mvz added the discussion label Jul 19, 2017
@troessner
Copy link
Owner

Agreed!

@mvz mvz added defect and removed discussion labels Aug 27, 2017
@mvz mvz added this to the Reek 4.8 milestone Jan 5, 2018
@troessner
Copy link
Owner

I think we now have a much more cleaner and consistent error handling as at the time of writing this ticket.
Wouldn't it be enough to catch all StandardErrors in Application#execute, set the status and then re-raise?

@mvz
Copy link
Collaborator Author

mvz commented Jul 2, 2018

Errors that make it all the way up to Application#execute will probably just cause Ruby to print its stack trace and exit with an error status. This ticket is mostly about errors that are logged by LoggingErrorHandler, letting Reek continue with the next file. We'll have to keep track of errors handled by this handler and have ReportCommand#execute return a failure code if there were any.

@mvz mvz removed this from the Reek 4.8 milestone Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants