coding standards

Events happening in the community are now at Drupal community events on www.drupal.org.

Naming conventions for Entities and how to take take decisions while reviewing Project Applications?

Posted by d34dman on April 14, 2013 at 7:22pm

This http://drupal.org/node/1603204 document on drupal.org sounds more like a guideline while developing custom modules for personal use or using the UI to create entities.

When i asked about entity naming convention in #drupal-contribute, xano told me that everything ( entity machine name ) should be prefixed with module name.

While checking a project application, it was found that it used "watchdog" as an entity name. Should it be allowed?

Should

  1. Is it a must that "Machine name of every entity declared by a module should be prefixed with the module name." ? Or,
Read more

Naming conventions for Entities and how to take take decisions while reviewing Project Applications?

Posted by d34dman on April 14, 2013 at 7:22pm

Sorry post got created twice. If somebody could delete thise. Please do.

Link to the other post is below.

http://groups.drupal.org/node/293813

Read more

All New CSS coding standards up for discussion!

Posted by johnalbin on January 15, 2013 at 8:56pm

Over 4 years ago, Alan Burke noticed that Drupal didn't have any CSS coding standards. He asked the documentation team lead at the time, Addison Berry, for advice and she suggested that if they wrote the first draft of the CSS coding standards, that would get the ball rolling on discussing them. The goal being to write, iterate and come to consensus on Drupal’s coding standards. See http://groups.drupal.org/node/14421 for the original discussion.

Unfortunately, its 4 years later and the CSS coding standards are still marked "Draft". http://drupal.org/node/302199

Read more

Code standard check at the time of git commit

Posted by fotuzlab on May 10, 2012 at 11:39am

Was wondering if we could include pre-commit git hooks in module/theme repositories to check drupal coding standards. (Like the ones provided by http://drupal.org/project/git_hooks).
This would help in standardizing the code on d.o

The only problem I find is ... new contributors may find it irritating and hence put them off.

Thoughts???

Read more

Create cookie naming standards

Posted by rwohleb on April 4, 2012 at 9:14pm

There are a handful of modules that set extra cookies to accomplish various things outside of the session. Some of them are used only on the client side and the server never needs to see them. Some of them are actually used on the server side. See:
https://wiki.fourkitchens.com/display/PF/Modules+that+break+caching,+and...

Read more

Checking Coding Standards In NetBeans

Posted by Jamie Holly on January 17, 2012 at 12:08am

Just wanted to share this little gem I found with the other Netbeans users out there:

http://www.amaxus.com/cms-blog/coding-standards-netbeans-php-codesniffer

It's a plugin for Netbeans that allows you to run Php_CodeSniffer from within Netbeans. I've been using it today with the DrupalCS standards library (http://drupal.org/project/drupalcs ) and it works pretty well. There's a couple little glitches, but it ends up catching about 99% of the stuff.

Also there's another version in development here:

http://sourceforge.net/projects/phpmdnb/

Read more

SQL coding standards and whitespace

Posted by stella on October 30, 2008 at 1:24pm

I was just wondering if we have, or if we should have, any SQL coding standards regarding whitespace usage. For example, should we be using a space between column names in IN where clauses or have spaces on either side of comparison operators, etc.

Here are some examples to illustrate what I mean:

SELECT a,b,c FROM {table} WHERE a IN (1,2,3) AND b=4;
vs
SELECT a, b, c FROM {table} WHERE a IN (1, 2, 3) AND b = 4;

and
INSERT INTO {table} (a,b,c) VALUES(1,2,3);
vs
INSERT INTO {table} (a, b, c) VALUES (1, 2, 3);
Read more
6 comments Categories:

"elseif" vs "else if"

Posted by stella on July 18, 2008 at 8:31pm

In the latest code review done by chx and Morbus at http://www.drupaltoughlove.com, one of the items commented on was the usage of "else if" instead of "elseif". There's nothing in the Coding Standards doc that specifically states that one should be used over the other, however it is "implied" from the first example on indentation that "elseif" should be used. Can the Coding Standards doc be updated so that it states one way or the other? Personally I don't mind which, but I would prefer if there was consistency. Core itself has a mixture, but with a higher number of "elseif".

Read more
4 comments Categories:

Tests in core: What's next?

Posted by floretan on April 24, 2008 at 7:46am

We now have a testing framework in Drupal core. What we need to move forward is some structure that makes writing tests easy and efficient so that we can go towards our 100% code coverage goal without wasting development resources.

Read more

Lesson #2 Screencast -- Coding Standards, Keeping code clean

Posted by mpare on January 12, 2007 at 12:03pm

Drupal-Dojo Lesson #2 Screen/SkypeCast

Folks, It is really big! The skype audio is not so hot at times, and there is about a minutes audio cut out, from when I got careless, but if you want it, your welcome to it. Go to http://www.parete.fatcow.com/session2.mov[dead link] to download the video. The file is huge! (~240 MB. 1hr 43min 1024 x 782 ) VNC screen did not do very well with how often the windows were switched. I think that this video is usable until the original recording can be made available.

Read more
Subscribe with RSS Syndicate content

AltStyle によって変換されたページ (->オリジナル) /