This issue is to ideally remove the false positive sniffs for getInfo(), setUp() and tearDown() in test classes.
To my knowledge, all of core's D8 test class names end in either *Test.php or *TestBase.php. Just forgoing the warning in these collection of test files would be a great help.
According to @jhodgdon in #1533244-22: Make help module pass Coder Review item f),
Missing function doc comment
public static function getInfo() {
Our coding standards for tests unfortunately are not standard with our coding standards for other classes, and we specifically do *not* want doc comments on getInfo(), setUp(), and tearDown() methods in classes, so ignore this message for those methods.
Comments
Comment #1
lars toomre commentedChanging the component and clarifying the category. This is coming up much in the sub-issues of #1518116: [meta] Make Core pass Coder Review.
Comment #2
lars toomre commentedAttached is a work-in-progress patch for this issue.
I was having trouble figuring out how to extract the filename currentFile object. Perhaps someone can help there?
Also, I changed the error message text so that each is unique and we can see from the resulting report exactly which portion of the test caused the error.
Comment #3
lars toomre commentedHere is a patch without all of the Windows CRLF changes... Sorry about that.
Comment #4
yesct commentedthis is probably both "needs work" (for the windows CRLF changes) and "needs review" (on what is there so far)
might help more this forward:
(issue summary help doc in case a new contributor find this http://drupal.org/node/1427826)
(this will probably be most helpful if done by someone familiar with the situation)
(I have a dream of automated standards testing of core patches.)
Also, some "steps to reproduce" or "steps to test" might help bring in people to aid this effort. (tips on contributor task doc page: http://drupal.org/node/1468198)
Comment #5
yesct commented(ok the tags are not really helpful on contrib...)
Comment #6
traviscarden commentedThis "works as intended" now on account of #338403: Use {@inheritdoc} on all class methods (including tests).