They are defined on http://drupal.org/coding-standards

You seem to be using a tab width of 4. Tabs are an incredible nuisance, because they only work for those people who happen to have set the right tab width. With every contrib module using a different tab width it becomes impossible to open more than one at the same time. For this reason, the Coding Standards explicitly forbid using tabs: http://drupal.org/coding-standards#indenting

This means that everyone who touches core or contrib source code should disable tabs in their editors (and activate the "convert tabs to spaces" function if it exists). It also helps to enable "visible white space". Clean code requires some discipline, but in the end it benefits everyone.

Comments

salvis’s picture

Actually, not only are some lines indented with spaces and others with tabs, but the indentation (and possibly even the tab width!) is uneven. Drupal prescribes indenting by two spaces per level.

Ultimately, you'd like your code to pass all the tests done by the Coder module. This will be a great help when you're looking to Coder to help migrate to Drupal 7 (which is real soon now!)...

danepowell’s picture

Title: Please adhere to the Drupal Coding Standards » Code needs to be refactored to adhere to the Drupal Coding Standards
Category: bug » task

I'll second this... I really am pleased by the development with this module and appreciate all that the maintainers are doing, but the coding standards are definitely somewhat below par. The last dev release was a particular problem for me, because dozens of lines with spaced indentation got replaced by tabs. Since I do vendor branching and have to manually resolve changes with each release, this meant a LOT of unnecessary labor for me...

I'm the kind of crazy person that loves tackling menial tasks like this and just "making things right". If you want to set me loose on the CVS repo and let me run everything through the Coder module just say the word :)

kreynen’s picture

Assigned: Unassigned » kreynen
Status: Active » Fixed

There are still a few minor issues, but most of the formatting clears Coder's checks

Status: Fixed » Closed (fixed)

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