Hi,
In #1772676: How to "ignore" warnings it is explained how to ignore a rule, putting the comment // @ignore rule_name before it.
How to figure out the rule name we want to ignore?
For example, let's say I don't want the following code to generate a security warning:
// @ignore security
drupal_set_message(t($message['message'], $message['args']), 'status', FALSE);
I was under the impression that the line // @ignore security would prevent the warning from showing up, yet it still does.
Any suggestions would be welcome, thanks!
Albert
Comments
Comment #1
douggreen commentedThe rule name is displayed in the output. In the GUI it's at the end of the warning message. In drush, it's at the beginning of the line. You probably want
Beware that the coder ignore system is new, and some of the warning names may still change.
Comment #2
alberto56 commentedHi, thanks for the response.
I'm not sure where I can find "security_3". In my case it is neither in the GUI nor in the drush printout. Also, // @ignore security_3 does not ignore the following line.
Perhaps some documentation on this, with examples, is needed.
Cheers,
Albert.
Comment #3
alberto56 commentedOK, found it!
The enclosed image shows how to find the code. I was using 7.x-1.x-dev and not 7.x-2.x-dev, that's why I was not finding. Perhaps putting the 7.x-2.x-dev snapshot on the project homepage might help other version-challenged users such as myself.
Thanks,
Albert.
Comment #4
klausiYep, now that drupalcs has been merged into this project it would be cool to make this available to a broader user base with development snapshots.
Comment #5
douggreen commentedThanks, it's there now, sorry I forgot to do this earlier. We are actually close to a 7.x-2.1-RC1 release.