Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
ajax system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 Oct 2008 at 16:55 UTC
Updated:
14 Oct 2010 at 21:39 UTC
Based on the discussion on http://groups.drupal.org/node/7731, it appears that putting comments for inherited test methods like getInfo(), setUp() and tearDown() is generally confusing. Rather than treating them like hook implementations or having a generic comment being repeated, it would be cleaner to not have comments at all. This opinion is shared by many people including dww, moshe and drewish.
Here's a patch based on a regular expression to remove all comments from getInfo(), setUp() and tearDown() functions in .test files.
For the reference, here's the regexp:
In *.test files, replace
([^\n]*\/\*\*\n.*\n\s*\*\/\n)(\s*)function (getInfo|setUp|tearDown)
with
$2function $3
| Comment | File | Size | Author |
|---|---|---|---|
| test_comment_cleanup.patch | 50.49 KB | floretan |
Comments
Comment #1
Anonymous (not verified) commentedThe last submitted patch failed testing.
Comment #2
dwwFWIW, I totally support this change. ;)
Comment #3
naxoc commentedIt seems that the generic comments have been removed. This produces nothing now:
grep -r '([^\n]*\/\*\*\n.*\n\s*\*\/\n)(\s*)function (getInfo|setUp|tearDown)' .Closing the issue :)