Drupal coding style for Site Pass

jpetso - March 18, 2007 - 00:13
Project:Site Pass
Version:5.x-1.x-dev
Component:Code
Category:task
Priority:minor
Assigned:Unassigned
Status:needs review
Description

I'm going to base a new module I need from Site Pass code, but before starting off I wanted to make the code as readable and styleguide compliant as possible. Here's a patch that doesn't change any of Site Pass's functionality, but includes style fixes like:
- removal of trailing spaces
- proper spacing and indentation
- sentence capitalization, like introduced as the new standard for Drupal 5
- getting most lines to fit into 80 characters
- sitepass_* or _sitepass_* as prefix for all functions
- and probably a few more.

Hope you like it this way, I tried my best not to be intrusive.

AttachmentSize
sitepass_style.patch50.95 KB

#1

jpetso - March 18, 2007 - 08:32

...and everyone say it with me: you shall test patches before uploading them. you shall test patches before uploading them. you shall...

AttachmentSize
sitepass_style_try2.patch 51.05 KB

#2

jpetso - March 18, 2007 - 08:40

One more to also make the Coder module (the one that does style checking) happy.

AttachmentSize
sitepass_style_try3.patch 51.19 KB

#3

jpetso - March 18, 2007 - 11:30

Still one more to unbreak the CREATE TABLE statement that contains one closing parenthesis too much. Also moving sitepass_uninstall() to the sitepass.install file where it belongs.

AttachmentSize
sitepass_style_try4.patch 51.56 KB
 
 

Drupal is a registered trademark of Dries Buytaert.