- 1. Boston DrupalCon A Developer's Assistant: Using Coder for
Module Developers & Maintainers By Doug Green [email_address]
[email_address]
2. http://drupal.org/project/coder A Developer's Assistant
- Developer Module, built for you (and me)
- Credit contributors: snpower, webchick, nancyw
3.
- Upgrade Reviews (4.7.x, 5.x, 6.x)
- Security & Performance Reviews
A Developer's Assistant 4.
- spaces, tabs, indentation
- global variable names, camelCase
- What does thestyle reviewcheck?
- See http://drupal.org/node/114774
A Developer's Assistant 5.
- spacings and indentation within comments
- What does thecomment reviewcheck?
- See http://drupal.org/node/318
A Developer's Assistant 6.
- capitalization of SQL keywords
- SQL LIMIT instead of db_query_range()
- What does theSQL reviewcheck?
A Developer's Assistant 7.
- What does theupgrade reviewcheck?
- See http://drupal.org/node/114774
A Developer's Assistant 8.
- not enough, difficult problem
- SQL injection through variables
- REQUEST_URI instead of request_url()
- What does thesecurity reviewcheck?
- See http://drupal.org/node/28984
A Developer's Assistant 9.
- Download from project page, install, and enable
- Setup defaults on admin/settings/coder
- http://localhost/coder - selection form
- http://localhost/coder/defaults
- http://localhostcoder/core - all of core
A Developer's Assistant 10.
- Selection Form / Settings Form
A Developer's Assistant 11.
A Developer's Assistant 12.
- Run from Drupal 6 (recommended)
- But it's just a tool that makes suggestions
- You are Smarter than Coder
- Drupal 5.x -> 6.x Upgrade Review
A Developer's Assistant 13.
A Developer's Assistant 14.
- cvs co DRUPAL-52 + DRUPAL-5 branches
- Coder Style Review of all of Drupal
A Developer's Assistant 15.
- 1. Use an indent of 2 spaces, with no tabs
- 5. curly braces { should end a line, not start one
- 7. indent secondary line of comment one space
A Developer's Assistant 16. if (!$table) { $as .= '_orderby';
$alias = $field; } should be if (!$table) { $as .= '_orderby';
$alias = $field; }
- 111,153 warnings... views.module, line 66, 67
- 1. Use an indent of 2 spaces with no tabs
A Developer's Assistant 17. if(!isset ($node)){
$node=array('status' => 1); } should beif (!isset($node)) {
$node = array('status' => 1); }
A Developer's Assistant 18. /** * Output a confirmation form * *
This function returns a complete form for confirming an action. A
link is * offered to go back to the item that is being changed in
case the user * changes his/her mind. *
- 29,205, system.module +2126
A Developer's Assistant 19. '#title' => $module . ' module',
should be'#title' => $module .' module',
A Developer's Assistant 20. '#title' => $module . ' module',
should be'#title' => $module .' module',
- 5.curly braces { should end a line, not start one
A Developer's Assistant 21. $testBucket =
variable_get('mm_s3_bucket', ...should be$test_bucket =
variable_get('mm_s3_bucket', ...
- 11,126, stdClass is an exception
A Developer's Assistant 22. /** * Format a password field. */
should be /** * Format a password field. */
- 7. indent 2 ndline of comment one space
A Developer's Assistant 23.
- show review of views from the browser
- demo 1.x upgraded to Drupal 6.x
A Developer's Assistant 24.
- Continue to improve security review
- Create patch files somewhat possible
- Parse & code flow analysis probably not
A Developer's Assistant 25. [email_address]
http://drupal.org/project/coder A Developer's Assistant