Naming conventions for Entities and how to take take decisions while reviewing Project Applications?
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
- Is it a must that "Machine name of every entity declared by a module should be prefixed with the module name." ? Or,
Naming conventions for Entities and how to take take decisions while reviewing Project Applications?
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 moreAll New CSS coding standards up for discussion!
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 moreCode standard check at the time of git commit
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 moreCreate cookie naming standards
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...
Checking Coding Standards In NetBeans
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 moreSQL coding standards and whitespace
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);
"elseif" vs "else if"
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 moreTests in core: What's next?
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 moreLesson #2 Screencast -- Coding Standards, Keeping code clean
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