Closed (fixed)
Project:
Drupal Code Sniffer
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Nov 2011 at 11:51 UTC
Updated:
4 Jan 2012 at 17:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
sirkitree commentedTook a look at this, and found the code where this happens:
But I'm totally incapable of discerning a modification to the preg_match() that will account for this. :(
Comment #2
doitDave commentedNot tested, just from mind to keyboard:
HTH.
Edit: preg pattern.
Comment #3
sirkitree commentedNo good. Still detects the example as a warning, just spits out an extended message.
Comment #4
doitDave commented^^ Try again.
(Funny as it is: The code itself wouldn't even pass the indentation check... *ahum*)
Comment #5
sirkitree commentedStill getting the error.
Here is what I'm checking against:
Comment #6
doitDave commentedThat is correct. (The error.) The proper syntax is "Implements hook_foo_ BAR_ID_baz() for some_type_bar."
E.g.:
Implements hook_form_FORM_ID_alter() for comment_form.
Comment #7
sirkitree commentedOh, ok - I was going by your example in your original post. In that case, this works and here is a patch.
Comment #8
doitDave commentedDamn. I was right, you were right, I was wrong. Indeed it is twice "()" as of http://drupal.org/node/1354 - so, again, finally:
Comment #9
das-peter commentedThank you guys for the bug-hunting and elimination, very appreciated :)
This looks good to me and thus -> http://drupalcode.org/project/drupalcs.git/commit/4a54f1a
(The only change I made additionally, was that I added examples to the good / bad test-files)