[drupal-devel] Checking coding style of contributed modules
Dries Buytaert
dries at buytaert.net
Sat Feb 19 11:18:19 UTC 2005
Moshe Weitzman wrote:
> it is quite possible that we don't have enough qualified developers with
> enough time on their hands to perform code checking and functionality
> checking for this. If you look at the patch queue, it is quite common
> for *noone* to review a given patch, and we just let dries do it. i
> would think that Contrib code would be even less worthy of review. I'm
> not opposed to the 'door guard' arrangement, i am just skeptical that
> people will do what they promised.
Right on. I'm a True Believer of automation and self-organization (if
possible).
If we'd have a 'code check' script -- even an extremely basic one -- I
could install it on drupal.org and run the script once or twice a day on
_each_ project in the contributions repository and link the report from
the project pages.
For example, on the project page of the image module
(http://drupal.org/project/image), there would be a link called 'View
code report' that points to the image module's code report, generated by
the script.
Of course, it is nothing like a real review and it might generate false
positives but it could easily catch dozens of issues and encourage good
coding style without manual intervention and within a few hours. After
all, it is easy enough to detect tabs, '} else' or the absence of '{}'
in SQL queries.
--
Dries Buytaert :: http://www.buytaert.net/
More information about the drupal-devel
mailing list