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
CodeClimate engine - exit code #790
Comments
(Another option could be a command-line override, similar to RSpec's |
I like that, nice and clean! |
Let me ponder this, I have some ideas but I cannot elaborate on them right now. |
I would go for the simplest implementation possible right now. Since this whole engine is basically meant to run in a Docker instance, we may want to eventually create a separate executable for it that is only included in the Docker image and not in the gem, thus removing the dependency on code climate specific code and for special exit code handling in the main gem. (I have zero Docker experience so take this with a grain of salt.) |
Taking this over after our mail discussion. I think I'll go for @andyw8 suggestion
which I find really neat. |
To quote the CodeClimate spec:
-> wip |
Fix up in #808 |
Currently, Reek exits with a status of 2 when it detect smells.
When running Reek as a Code Climate engine (see #763), the engine needs to exit with a code of 0 when there are smells.
I'm trying to think how this can be elegantly handled in Reek.
The most direct way would be to add a conditional in
Application#report_smells
which reads theoptions.report_format
, but that's essentially a type check smell.I was thinking a better approach might be to set the status codes on a per-formatter basis, so each report would have methods for
#success_exit_code
,#error_exit_code
and#smells_exit_code
.This has the advantage that any future engines can control the exit codes, but it's perhaps a premature optimisation since this is currently only needed for Code Climate.
Any thoughts?
The text was updated successfully, but these errors were encountered: