Standards for CodeSniffer
- 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.
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)
We have stylize.php which will automagically convert code to proper standard.
Where is that? I don't see it in the maintenance directory.
--Cneubauer 19:09, 29 November 2010 (UTC)
Max Semenik 19:10, 29 November 2010 (UTC)
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