Closed (fixed)
Project:
Drupal Code Sniffer
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2012 at 14:44 UTC
Updated:
21 Apr 2012 at 17:41 UTC
The Doxygen and comment formatting conventions handbook page states the following:
@param and @return for the standard parameters and return value should be omitted from all form-generating functions. Do include @param documentation for additional parameters beyond $form and $form_state, if there are any.
If you observe this policy, however, Drupal_Sniffs_Commenting_FunctionCommentSniff::processParams(), complains that "Doc comment for var $documented does not match actual variable name $actual at position x". Can the sniff be adjusted to correctly reflect our policy?
Comments
Comment #1
klausiThanks for reporting this. Not a trivial fix, but I think I got it right. Now it is allowed to document just a subset of the available function parameters.
Fixed in this commit: http://drupalcode.org/project/drupalcs.git/commit/e69738b
Please test.
Comment #2
traviscarden commentedIt works great. Thanks!!