Closed (fixed)
Project:
Drupal Code Sniffer
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Aug 2012 at 23:02 UTC
Updated:
14 Sep 2012 at 21:01 UTC
Is this actually a coding standard? I've seen multiple, valid uses of this in core, and whenever we override, say, theme_pager, must correct a bunch of these to get code passing drupalcs.
Comments
Comment #1
klausiIt's defined in the coding standards: "Comments should be on a separate line immediately before the code line or block they reference." http://drupal.org/node/1354#inline
So an inline comment should always relate to code. I can see that there are some legit cases where this does not apply like marking the "end" of a certain code block as in theme_pager(). So we get some false positives from time to time, but I don't think there are so many that we should actually remove this check.
Comment #2
jhedstromWould you consider changing it to a warning instead of an error?
Comment #3
klausiSure, committed: http://drupalcode.org/project/drupalcs.git/commit/a4c64bd9e33966ff707492...
Comment #4
jhedstromThanks!