drupalcs generates the following false positive in aggregator.admin.inc:

FILE: ...core/modules/aggregator/aggregator.admin.inc
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
508 | ERROR | Use XHTML style <br /> tags instead of <br>
--------------------------------------------------------------------------------

I say it's a false positive because it refers to the following non-printing code, which you'll recognize as already being as it should be: variable_get('aggregator_allowed_html_tags', '<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>'). Can special cases like this be reasonably and maintainably accounted for?

Comments

klausi’s picture

Not really, I guess we have to accept some false positives here. I ported this check from coder because I saw code where people did it wrong quite a few times. We could of course remove that sniff if too many false positives turn up.

jhedstrom’s picture

We have to disable the checking of .inc files as soon as somebody exports a text format to a feature (if it includes '
' as part of the allowed tags). It'd be nice if the sniff could be fixed to be more discriminating, but failing that, I'd rather disable that sniff entirely than have to disable checking of .inc files.

klausi’s picture

Status: Active » Closed (won't fix)

Drupal Code Sniffer has been merged into Coder 7.x-2.x. Please move this issue to the Coder queue and reopen it if the problem still exists.