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

Add @suppress_breakman_warning to methods #496

Closed
h0jeZvgoxFepBQ2C opened this issue May 22, 2014 · 1 comment
Closed

Add @suppress_breakman_warning to methods #496

h0jeZvgoxFepBQ2C opened this issue May 22, 2014 · 1 comment

Comments

@h0jeZvgoxFepBQ2C
Copy link

Hey,

It would be nice if you can mark methods in the sourcecode itself, to suppress wrong-positive-warnings.

F.e.

def create
   # Following line will create an "Unprotected mass assignment" warning
  @account = Account.new(params[:account])
end

So it would be nice to have a marker to tell breakman to ignore the following/actual line:

def create
   @account = Account.new(params[:account]) # @suppress_breakman_warning (or even @suppress_breakman_unprotected_mass_assignment_warning)
end

What do you think?
Thanks!

@presidentbeef
Copy link
Owner

Sorry, I do not plan to ever support annotations in Brakeman. Please scroll through the year-long discussion in #73 for some background. There is an old fork implementing annotations at https://github.com/invernizzi/brakeman but it is quite out of date at this point.

Instead, Brakeman supports ignoring false positives via configuration file. Running brakeman -I provides a way to manage the configuration.

Repository owner locked and limited conversation to collaborators Feb 16, 2016
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