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

Even quieter #963

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

Even quieter #963

printercu opened this issue Nov 15, 2016 · 7 comments

Comments

@printercu
Copy link

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

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

@printercu
Copy link
Author

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
Copy link
Owner

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.

@printercu
Copy link
Author

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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants