Closed (won't fix)
Project:
Drupal Code Sniffer
Version:
7.x-1.0-alpha1
Component:
Documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Apr 2012 at 13:49 UTC
Updated:
4 Jan 2013 at 12:35 UTC
For reference: Drupal SimpleTest coding standards
Here's an example of a false positive:
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme
/**
* Functional tests for the Translation module.
*/
class TranslationTestCase extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'Translation functionality',
'description' => 'Create a basic page with translation, modify the page outdating translation, and update translation.',
'group' => 'Translation',
);
}
There are three inherited methods involved; getInfo, setUp, and tearDown.
Full disclosure; there is an open discussion, albiet not a very recent one, on this particular exception. It's possible that the resolution of this is to standardize on documenting implementations of these functions, which would make the false positive an accurate positive.
Comments
Comment #1
klausiFrom http://drupal.org/node/1354#classes
Comment #2
fluxsauce commentedAdditional context - we're using drupalcs for #1518116: [meta] Make Core pass Coder Review; the disparity between Drupal SimpleTest coding standards and Doxygen and comment formatting conventions has been noted and is why I opened this.
Not sure what the best course of action is; I agree that the SimpleTest standard should be changed, in particular I feel that this proposal addresses it.
Comment #3
klausiLet's wait on the outcome of #338403: Use {@inheritdoc} on all class methods (including tests)
Comment #4
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.
Comment #4.0
klausiSteps to replicate