Closed (won't fix)
Project:
Drupal Code Sniffer
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2012 at 22:01 UTC
Updated:
4 Jan 2013 at 12:35 UTC
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
Comment #1
klausiNot 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.
Comment #2
jhedstromWe have to disable the checking of
.incfiles 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
.incfiles.Comment #3
klausiDrupal 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.