Posted by Lars Toomre on October 7, 2012 at 12:18am
3 followers
| Project: | Coder |
| Version: | 7.x-2.x-dev |
| Component: | Coder Review |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
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
#1
Changing the component and clarifying the category. This is coming up much in the sub-issues of #1518116: [meta] Make Core pass Coder Review.
#2
Attached 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.
#3
Here is a patch without all of the Windows CRLF changes... Sorry about that.
#4
this 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)
#5
(ok the tags are not really helpful on contrib...)