Saw that this was done in the past. Would be good to apply to the latest coding standards for D7.
I am just trying resolve a random bug so decided to run some modules through the Coder module to eliminate that as a possible issue. Saw few issues with the D7 version that would be great to get into an upcoming release.
drush --contrib --no-empty --upgrade7x coder-review
sites/all/modules/contrib/date/date.js:
File: [critical] JavaScript should be compatible with other libraries than jQuery.sites/all/modules/contrib/date/date_admin.inc:
+199: [critical] Context has been added to t http://api.drupal.org/api/function/t/7() as the third parameter, locale has to be an element in the array. Example: array("context" => "frontpage", "locale" => "de").sites/all/modules/contrib/date/date_admin.js:
File: [critical] JavaScript should be compatible with other libraries than jQuery.sites/all/modules/contrib/date/date_api/date_year_range.js:
File: [critical] JavaScript should be compatible with other libraries than jQuery.sites/all/modules/contrib/date/date_popup/date_popup.js:
File: [critical] JavaScript should be compatible with other libraries than jQuery.sites/all/modules/contrib/date/date_popup/jquery.timeentry.pack.js:
File: [critical] JavaScript should be compatible with other libraries than jQuery.sites/all/modules/contrib/date/date_repeat/tests/date_repeat.test:
+26: [critical] Use absolute path, constructed from DRUPAL_ROOT, when including a file.
+27: [critical] Use absolute path, constructed from DRUPAL_ROOT, when including a file.sites/all/modules/contrib/date/date_tools/date_tools.change_type.inc:
+107: [critical] Use absolute path, constructed from DRUPAL_ROOT, when including a file.
+120: [critical] Use absolute path, constructed from DRUPAL_ROOT, when including a file.sites/all/modules/contrib/date/date_all_day/date_all_day.module:
+12: [critical] Module .info files must now specify all loadable code files explicitly.sites/all/modules/contrib/date/date_api/date_api.module:
+62: [critical] Context has been added to t http://api.drupal.org/api/function/t/7() as the third parameter, locale has to be an element in the array. Example: array("context" => "frontpage", "locale" => "de").sites/all/modules/contrib/date/date_api/date_year_range.js:
File: [critical] JavaScript should be compatible with other libraries than jQuery.sites/all/modules/contrib/date/date_migrate/date_migrate_example/date_migrate_example.module:
+28: [critical] Info file should specify core=7.xsites/all/modules/contrib/date/date_popup/date_popup.module:
+14: [critical] Module .info files must now specify all loadable code files explicitly.sites/all/modules/contrib/date/date_popup/date_popup.js:
File: [critical] JavaScript should be compatible with other libraries than jQuery.sites/all/modules/contrib/date/date_popup/jquery.timeentry.pack.js:
File: [critical] JavaScript should be compatible with other libraries than jQuery.sites/all/modules/contrib/date/date_repeat/tests/date_repeat.test:
+26: [critical] Use absolute path, constructed from DRUPAL_ROOT, when including a file.
+27: [critical] Use absolute path, constructed from DRUPAL_ROOT, when including a file.sites/all/modules/contrib/date/date_repeat_field/date_repeat_field.module:
+14: [critical] Module .info files must now specify all loadable code files explicitly.sites/all/modules/contrib/date/date_tools/date_tools.module:
+92: [critical] Context has been added to t http://api.drupal.org/api/function/t/7() as the third parameter, locale has to be an element in the array. Example: array("context" => "frontpage", "locale" => "de").sites/all/modules/contrib/date/date_tools/date_tools.change_type.inc:
+107: [critical] Use absolute path, constructed from DRUPAL_ROOT, when including a file.
+120: [critical] Use absolute path, constructed from DRUPAL_ROOT, when including a file.
See:
https://drupal.org/update/modules/6/7#javascript_compatibility
https://drupal.org/update/modules/6/7#registry
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | date-coder-review-1078788-5.patch | 3.69 KB | jacob.embree |
Comments
Comment #1
akoepke commentedKarenS made a post in another issue about rewriting the module.
http://drupal.org/node/1066690#comment-4148396
Comment #2
mgifford#1066690: Many D7 views are broken is now closed, but the need to re-run through coder still exists. There are some elements with translation in particular that should be addressed I think:
Mostly it's just spaces & formatting stuff. Still it's a big module with lots of stuff dependent on it. That and there's an effort (by @Karen) to bring it into D8.
Comment #3
kenorb commentedComment #4
kenorb commentedComment #5
jacob.embree commentedTakes care of the Coder review except for doc block comments.
Comment #6
mgiffordMakes sense to me. Let's bring in these simple spacing issues.
Comment #7
podarok