"Ignore this" rule

in
6.x-1.x-dev, Review/Rules, feature request, normal, active

Occasionally when I'm working on a module, Coder gives me errors that are not accurate. This usually happens with either PHP's string functions (which, in many cases, are faster than the drupal_ versions) or when dynamically building SQL queries (and a safe string is inserted into a query using %sinstead of '%s').
Those errors are annoying, and get in the way when I'm trying to look at everything else. So it would be nice if there was a way to tell coder "don't check this line." It would also be a nice way to check sections of code as you're working on them if you still have some to-do items.
To do this, I propose a comment-based mechanism:
<?php//If this appears immediately above a line of code OR on the same line as other code, don't check that line for rule violations.  CL stands for "coder line."//!CL//This code can wrap around a block of code to tell Coder "don't check any of the code between these two lines."  CB stands for "coder block" and -s and -e stand for "start" and "end," respectively.//!CB-s//!CB-e?>
So for example:
<?php
//This line would not be caught as a rule violation by Coder for using substr instead of drupal_substr.
$string1 = substr($string0, 1, 2); //!CL
//The same applies here, but the structure is different.
//!CL
$string1 = substr($string0, 1, 2);
read more