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 |
Jump to:
Description
Please comply to coding standards. Thank you.

#1
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
#3
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
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
#6
Ok, it's much, much better, but a couple of things still:
Spaces after comments, like such:
<?phpmy_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
Super Nav is now standards compliant. :)
Thanks for the ppush, cwgordon!
Chris
#8
Automatically closed -- issue fixed for two weeks with no activity.