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.x

sites/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

CommentFileSizeAuthor
#5 date-coder-review-1078788-5.patch3.69 KBjacob.embree

Comments

akoepke’s picture

Status: Active » Closed (duplicate)

KarenS made a post in another issue about rewriting the module.

http://drupal.org/node/1066690#comment-4148396

mgifford’s picture

Status: Closed (duplicate) » Active

#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:

severity: normalreview: i18n_11Line 62: The $string argument to t() should not begin or end with a space. (Drupal Docs) [i18n_11]

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.

kenorb’s picture

Title: Please run through coder again » Critical coder issues in Date
Version: 7.x-2.x-dev » 7.x-2.6
Category: Feature request » Task
Issue summary: View changes
kenorb’s picture

Issue summary: View changes
jacob.embree’s picture

Title: Critical coder issues in Date » Coder issues in Date
Version: 7.x-2.6 » 7.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new3.69 KB

Takes care of the Coder review except for doc block comments.

mgifford’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense to me. Let's bring in these simple spacing issues.

podarok’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.