Standards for CodeSniffer

Jump to: navigation, search
  • Checking code for a coding standard without automatic checking is very inefficient.
  • There is PHP_CodeSniffer which supports a lot of PHP standards (PEAR, Zend, PHPCS, Squiz, Kohana...)
  • But none of these standards are compatible with MediaWiki coding standards.
  • Do MediaWiki-standard for PHP_CodeSniffer exists? May be anyone know? Сan anyone easily make it?
—The preceding unsigned comment was added by an unknown user on a unknown date.07:13, 5 December 2011

Yeah, I second this. The staff is working on a phpUnderControl instance, so I'm sure they will get around to this eventually.

--Cneubauer 17:58, 17 September 2010 (UTC)07:13, 5 December 2011
 

We have stylize.php which will automagically convert code to proper standard.

-- Bryan (talk|commons) 17:50, 28 October 2010 (UTC)07:14, 5 December 2011

Where is that? I don't see it in the maintenance directory.

--Cneubauer 19:09, 29 November 2010 (UTC)07:14, 5 December 2011

It's here.

Max Semenik 19:10, 29 November 2010 (UTC)07:14, 5 December 2011
 
 

If anyone is interested, I have created a very basic MediaWiki coding style and it is now hosted by the Wikimedia Fundation as mediawiki/tools/codesniffer.git

Gerrit: https://gerrit.wikimedia.org/r/#q,project:mediawiki/tools/codesniffer,n,z

To clone it:

git clone https://gerrit.wikimedia.org/r/p/mediawiki/tools/codesniffer

Antoine "hashar" Musso (talk)07:47, 11 April 2012
 
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Toolbox