Few days ago I found core.coder_review_ignores.txt file in Coder review's folder. It was quite clear, that can be used to ignore false positive errors, but I was not sure how. Thanks to solotandem I now know how to used it. If you want to add your custom ignores, you first have to implement hook_coder_review_ignore().
function MYMODULE_coder_review_ignore() { return array( 'path' => drupal_get_path('module', 'my_module'), // Set this as appropriate. 'line prefix' => '', // Ok to leave blank. ); }
This hook tells coder review where to look for your ignore file. File must be named MYMODULE.coder_review_ignores.txt and must be placed at the location given by "path" value. File structure is really simple. Every ignore directive goes to separate line and defines location and type of false positive error. Each directive is constructed like this:
filename:line_number:review_type
- filename: name of file,
- line_number: number of line,
- review_type: type of test (style, sql, security, comment, i18n, upgrade6x or upgrade7x).
Example below would ignore 3 false positives from file some_module.module.
some_module.module:101:upgrade7x some_module.modulee:201:security some_module.module:301:style