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

klausi’s picture

It'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.

jhedstrom’s picture

Would you consider changing it to a warning instead of an error?

klausi’s picture

jhedstrom’s picture

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.