Download & Extend

25 code style errors in a 20 line module. A new record?

Project:Cluetip
Version:5.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

... just joking. Half of them were just tabs :-)
Anyway, here's what it SHOULD look like to get through code review, although I haven't even started adjusting functionality yet.

<?php
<?php
// $Id: cluetip.module,v 1.1 2007/12/31 22:10:59 stompeers Exp $

function cluetip_load($file) {
  static
$cluetip_added;
  static
$cluetip_files;
  if (
$cluetip_added != 1) {
   
$cluetip_dir = drupal_get_path('module', 'cluetip') .'/cluetip/';
   
drupal_add_js($cluetip_dir .'jquery.dimensions.js');
   
drupal_add_js($cluetip_dir .'jquery.hoverIntent.js');
   
drupal_add_js($cluetip_dir .'jquery.cluetip.js');
   
drupal_add_css($cluetip_dir .'jquery.cluetip.css');
   
$cluetip_added = 1;
  }
  if (!
$cluetip_files[$file]) {
   
drupal_add_js($file);
   
$cluetip_files[$file] = TRUE;
  }
  return
$file;
}
?>

(and no closing php tag :-)
Thus, the patch is bigger than the module...
AttachmentSize
cluetip-coding_standards.patch1.51 KB

Comments

#1

Thanks, :P Hope for a commit.

#2

The new D6 version has been run though coder and is fully compliant ! Dev build should be available in the next few hours.

#3

Status:needs review» closed (fixed)

Clearing out old issues. The D7 version at least should be fine, and I believe as soon as I make any change to the D6 version my editor will strip whitespace and convert tabs to spaces :o) ...and I'm pretty sure the D5 version isn't supported by anyone anymore.