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

Even quieter #963

Closed
printercu opened this Issue Nov 15, 2016 · 7 comments

Comments

Projects
None yet
2 participants
@printercu
Copy link

printercu commented Nov 15, 2016

Hi!

I want to integrate brakeman into git hook, and think it would be great if it printed as less as possible (without header and list of checks, maybe even No warnings! when everything is OK). WDYT about this feature?

I have a look at code and see that there is a batch of reporters, and each one must be edited to support this option. Or maybe allow this option only for table-reporter?

@presidentbeef

This comment has been minimized.

Copy link
Owner

presidentbeef commented Nov 15, 2016

Are you saying you want no output if no warnings are found (or just no warnings found) but you do want a report if warnings are found?

@printercu

This comment has been minimized.

Copy link

printercu commented Nov 15, 2016

Yes, I think only this lines would be just fine:

output_table("+Obsolete Ignore Entries+", generate_obsolete, out)
output_table("+Errors+", generate_errors, out)
output_table("+SECURITY WARNINGS+", generate_warnings, out)
output_table("Controller Warnings:", generate_controller_warnings, out)
output_table("Model Warnings:", generate_model_warnings, out)
output_table("View Warnings:", generate_template_warnings, out)

@printercu

This comment has been minimized.

Copy link

printercu commented Nov 15, 2016

Ah, I got that I can define my own report, made from Table. Just leave this lines. Do you want to have this reporter in the repo?

@presidentbeef

This comment has been minimized.

Copy link
Owner

presidentbeef commented Nov 25, 2016

I don't think it would need to be a different report. Perhaps just an option like --no-header? Or --no-summary?

@printercu

This comment has been minimized.

Copy link

printercu commented Nov 25, 2016

This would be just enough. Do you think it would affect only table reporter? Other way there will be much more work to be done.

@presidentbeef

This comment has been minimized.

Copy link
Owner

presidentbeef commented Nov 28, 2016

I'd do it for table and plain. The tricky thing with --no-summary is that the summary_only option becomes ternary instead of binary: true, false, and not set. But I think I like it best since it doesn't really add a new command line option.

presidentbeef added a commit that referenced this issue Dec 16, 2016

@printercu

This comment has been minimized.

Copy link

printercu commented Dec 26, 2016

Cool, thank you!

Repository owner locked and limited conversation to collaborators May 16, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.