[dokuwiki] Checking coding standards with PHP CodeSniffer

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: DokuWiki Mailinglist <dokuwiki@xxxxxxxxxxxxx>
  • Date: Sun, 18 Oct 2009 19:46:15 +0200

Hi *

I just checked in a few files to be used with PHP CodeSniffer [1].
This PEAR tool uses given rulesets to check PHP, CSS and JS files for
coding standard violations. Since we don't have any fixed coding
standard yet, the checks aren't very complete. I basically included a
few checks from other standards as far as they did match our own loose
"standard".

One thing that bugs me most currently is the inconsistent use of
indenting spaces. Some files have 2 spaces others have 4 and there are
even a few with both.

I added a test that checks indention based on a 4 space standard and
I'd like to change all DokuWiki files to use 4 spaces - Unless someone
has some very serious objection (don't even try to start with tabs -
no discussion about that). Patches to fix up "broken" files would be
welcome of course.

Andi


[1] http://pear.php.net/package/PHP_CodeSniffer

-- 
splitbrain.org
-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts:

  • » [dokuwiki] Checking coding standards with PHP CodeSniffer - Andreas Gohr