Slideshow transcript
Slide 1: Code Review is not just for Standards Barcelona DrupalCon
Slide 2: Code Review is not just for Standards (INSERT PICTURE OF BARCELONA) (maybe Gaudi House on Catalunya) By Doug Green douggreen@douggreenconsulting.com doug@civicactions.com
Slide 3: Code Review is not just for Standards •Coder Module •History •Developer Module, built for you (and me) •What does it do? •Credit code-style.pl •Credit contributors: webchick, nancyw http://drupal.org/project/coder
Slide 4: Code Review is not just for Standards •Types of Reviews •Style Review •Upgrade Reviews (4.7.x, 5.x, 6.x) •Security Reviews •Performance Reviews
Slide 5: Code Review is not just for Standards •Style Review •Not what this talk is about •But some simple hints
Slide 6: Code Review is not just for Standards •Common Style Problems •$var .' followed by a quote' •'quote followed by a '. $var •while ($space_before_left_paren) •while ($space_after_right_paren) { •indent 2 spaces, don't use tabs •don't end with a ?> •don't use camelCase or CamelCase •See http://drupal.org/node/318
Slide 7: Code Review is not just for Standards •Drupal 5.x -> 6.x •FAPI •Menu •Schema API •Info File changes •... much much more ... •See http://drupal.org/node/114774
Slide 8: Code Review is not just for Standards •Drupal 5.x -> 6.x Upgrade Review •Run from Drupal 5 •Run from Drupal 6 (recommended) •Catches Quite a Bit... •But it's just a tool that makes suggestions •You are Smarter than Coder •We've got 10 minutes... •Let's Upgrade a Module Now!
Slide 9: Code Review is not just for Standards •How does Coder Work? •Coder Engine •What is a Review? •What is a Rule? •What is a Regular Expression?
Slide 10: Code Review is not just for Standards •Rule Types •regex •grep, grep_invert, callback
Slide 11: Code Review is not just for Standards •Rule Sources •php (default) •html •quote •doublequote •comment •all
Slide 12: Code Review is not just for Standards •Example Rule: array( '#type' => 'regex', '#value' => '_form_alter\\s*\\(\\$', ... ), •See http://drupal.org/node/144172
Slide 13: Code Review is not just for Standards •Another Example Rule: array( '#type' => 'regex', '#function' => '_menu$', '#value' => '\\$items\\[\\]\\s*=', ... ), •See http://drupal.org/node/144172
Slide 14: Code Review is not just for Standards •One More Example: array( '#type' => 'regex', '#value' => 'global \\$locale', ... ), •See http://drupal.org/node/144172
Slide 15: Code Review is not just for Standards •Why All the Examples Doug? •Coderis only as good as the Rules •Lot's of contributors •But 1 Developer (so far) •Please submit ideas •Please submit Review/Rules Patches •You can do it! •Really :) •It's your tool, and I need help •Really !
Slide 16: Code Review is not just for Standards •Potential •Security •Performance
Slide 17: Code Review is not just for Standards doug@civicactions.com http://drupal.org/project/coder



Add a comment on Slide 1
If you have a SlideShare account, login to comment; else you can comment as a guest- Favorites & Groups
Showing 1-50 of 1 (more)