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?
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?
no warnings found
Yes, I think only this lines would be just fine: https://github.com/presidentbeef/brakeman/blob/9d2777fd1e81d311478ae8f73977196383fd96ea/lib/brakeman/report/report_table.rb#L28-L33
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?
I don't think it would need to be a different report. Perhaps just an option like --no-header? Or --no-summary?
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.
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.
Add option to hide summary in plain/table reports
Cool, thank you!