With later releases of Coder, it's possible to define 'ignore' rules, i.e. tell Coder to ignore false positives. This seems to work with CTL rules that use core Coder functions, such as the "Use the matching Drupal theme functions" rule. However, rules that use a callback, such as the "Use sentence case" rule, do not respect ignored lines. The reason is that all calls to _coder_error should pass an array of ignored lines as the last argument.

See how _coder_error is called in the latest version of coder_6x.inc for an example.

Comments

danepowell’s picture

Status: Active » Needs review
StatusFileSize
new3.83 KB

Here is a patch to test...

danepowell’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new5.67 KB

Actually I missed a few lines, here's an updated patch. It's pretty simple- I've tested it and it works fine.

danepowell’s picture

FYI, this bug is also present in 7.x and will need to be patched there as well once this is committed.