Comply to coding standards, please.

cwgordon7 - February 26, 2008 - 23:24
Project:Super Nav
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

Please comply to coding standards. Thank you.

#1

chrisshattuck - February 27, 2008 - 00:29

I appreciate the comment, cwgordon,

Besides the obvious spacing and comments (and the installation profile on the Drupal 6 version), was there anything you saw in particular that could cause problems?

I'd like to get the code up to all standards, but wanted to get out a dev release so that I could draw some testers.

Thanks!
Chris

#2

chrisshattuck - February 27, 2008 - 00:30
Status:active» postponed (maintainer needs more info)

#3

cwgordon7 - February 27, 2008 - 05:25
Status:postponed (maintainer needs more info)» active

Major problem was spacing. However, what is also bad is that you need to follow doxygen coding standards; also, the you should unset $help_text after you're done with it; also, the way you are hard-coding the headers is bad, you should use theme('page'... Remember to always use an indent of two space, no tabs, no trailing spaces, no spaces on blank lines. There should never be any tabs in your code. Also, after commas should be spaces. In fact, just run the coder module over your module and clean it up.

#4

chrisshattuck - March 1, 2008 - 02:03

Thanks for the tips, cwgordon,

I've uploaded a new version with most of what the coder module suggests, except a couple minor items. I think the tabs would have been the most difficult thing for folks curious about the code, and they've been removed. It was using Dreamweaver as a code editor that was causing that little problem. ;)

I will keep the coding standards in mind in future updates.

Thanks again,
Chris

#5

chrisshattuck - March 1, 2008 - 02:04
Status:active» fixed

#6

cwgordon7 - March 1, 2008 - 04:56
Status:fixed» active

Ok, it's much, much better, but a couple of things still:

Spaces after comments, like such:

<?php
my_function_name
($param1, $param2);
?>

When concatenating strings, leave no spaces between the dot and strings, but one space between the dot and everything else. For example:

<?php
$mystring
= 'Start of string '. $var ."\n". t('My translatable text');
?>

#7

chrisshattuck - March 31, 2008 - 21:55
Status:active» fixed

Super Nav is now standards compliant. :)

Thanks for the ppush, cwgordon!
Chris

#8

Anonymous (not verified) - April 14, 2008 - 22:12
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.