Do you plan to use the Drupal coding standards?

The current status ( according to the coder module ) is:

Coder found 1 projects, 67 files, 4 critical warnings, 515 normal warnings, 538 minor warnings, 0 warnings were flagged to be ignored

Comments

_randy’s picture

Thanks for the report. Yes, we intend on tidying up the code to align it to the coder module's output.

johnbarclay’s picture

Coder module aside, the code is excellent. I'm evaluating this for a project I'm working on and noticed the following:

  • Very readable code
  • Highly themeable
  • takes advantage of drupal apis very well
  • uses pdo syntax
  • has a good set of api functions
  • Doesn't offer a lot of hooks, but thats to be expected for a new module
lliss’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
StatusFileSize
new142.93 KB

This patch should get maestro up to coding standards at least according to coder module.

lliss’s picture

Status: Active » Needs review
_randy’s picture

Thanks lliss. We'll review this patch for the coding standards.

blainelang’s picture

Status: Needs review » Fixed

Thanks @llis, I've committed this patch to HEAD.

Status: Fixed » Closed (fixed)

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

calte’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new41.38 KB

New patch should update more recent changes to drupal coding spec.

--EDIT--

With one exception:
maestro_inline_form_api_task.module
Line 130: Using eval() or drupal_eval() in your module's code could have a security risk if the PHP input provided to the function contains malicious code. (Drupal Docs)
eval($taskdata['form_api_code']);

That seemed a little more involved. Figured I'd leave it to those who are closer to the project :)

patcon’s picture

Hm, not sure why coder wasn't saying anything, but what about class names? UpperCamelCase is in vogue now it seems:
http://drupal.org/node/608152

(tipped off here: http://drupal.org/node/1290658#comment-5791146)

blainelang’s picture

Thanks @calvin, we appreciate any and all help :)

We are as well nervous about the eval function but have added a 2nd level permission that is by default disabled and we provide a clear warning. This module was initially written and released during Drupal 7 alpha and we needed a way to provide export/import of the workflows. It works well but yes, if time permits/client project, we would like to explore/use cTools exportables.

blainelang’s picture

Hi Pat, we will likely leave the class and method names as they are unless someone wants to contribute a patch. I see plenty of large modules like views and ctools that don't use UpperCamelCase or lowerCamelCase standard and still use _underscore convention. Based on your 2nd link and recent comments, the debate continues even in the core devel group. I personally like camelcase and am fine with either using lowercase or Uppercase first letter.

- blaine

patcon’s picture

Hey Blaine! Awesome that you're interested in ctools -- might be a fun opportunity to tinker with it

And yeah, that CamelCase standard mentioned in the queu caught me by surprise, so I came back to toss it out there :)

  • Commit 5abaa9f on 8.x-1.x authored by lliss, committed by blainelang:
    Coding standards fixes - issue #1105278
    
    
blainelang’s picture

Issue summary: View changes
Status: Needs review » Closed (fixed)