Last modified: 2013-01-22 14:36:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37588, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35588 - Jenkins job: PHP code style analyzer
Jenkins job: PHP code style analyzer
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Continuous integration (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Antoine "hashar" Musso (WMF)
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-29 15:33 UTC by Antoine "hashar" Musso (WMF)
Modified: 2013-01-22 14:36 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2012-03-29 15:33:55 UTC
This bug is about analyzing PHP file coding style. This might just be a weekly job or run on every change.

As a first step, we could use our homegrown style checker
We already have trunk/tools/code-utils/check-vars.php
It will does the job.

On a long term we want to migrate to PHP CodeSniffer which comes with a nice reporting and a nice interface to build syntax check upon.  Jenkins already has a plugin to interface with CodeSniffer making integration of PHP style check easier.


A basic MediaWiki syntax is available at https://github.com/hashar/PHP_CodeSniffer
Comment 1 Krinkle 2012-03-29 16:50:06 UTC
Removing as blocker for the initial CI plan implementation
Comment 2 Antoine "hashar" Musso (WMF) 2012-04-12 12:22:19 UTC
The relevant project is mediawiki/tools/codesniffer.git

Gitweb:
https://gerrit.wikimedia.org/gitweb/mediawiki/tools/codesniffer.git

Gerrit changes:
https://gerrit.wikimedia.org/r/#q,project%3Amediawiki/tools/codesniffer,n,z
Comment 3 Antoine "hashar" Musso (WMF) 2012-07-04 09:21:19 UTC
ccing Platonides who talked about CodeSniffer with me a few days ago
Comment 4 Antoine "hashar" Musso (WMF) 2013-01-21 21:30:15 UTC
I finally looked at this during some spare time. The related changes are:

Jenkins:

"PHP CodeSniffer macros and templates" https://gerrit.wikimedia.org/r/45063 
"Jobs for mediawiki/core" https://gerrit.wikimedia.org/r/45064

Zuul:

"phpcs jobs are non voting for now" https://gerrit.wikimedia.org/r/45065
"triggers the PHP cs jobs above" https://gerrit.wikimedia.org/r/45066
Comment 5 Antoine "hashar" Musso (WMF) 2013-01-21 21:30:36 UTC
Will eventually test out / deploy that tomorrow (or another day)
Comment 6 Antoine "hashar" Musso (WMF) 2013-01-22 09:32:03 UTC
deployed in production for mediawiki/core.git
Comment 7 Antoine "hashar" Musso (WMF) 2013-01-22 09:34:05 UTC
Example output for the maintenance/eval.php file:

https://integration.mediawiki.org/ci/job/mediawiki-core-phpcs-HEAD/3/violations/file/maintenance/eval.php/?
Comment 8 Antoine "hashar" Musso (WMF) 2013-01-22 14:36:31 UTC
I have updated the MediaWiki coding standard https://gerrit.wikimedia.org/r/#/c/45131/

Wrote some lame documentation on the wiki https://www.mediawiki.org/wiki/Continuous_integration/PHP_CodeSniffer

And changed our Jenkins jobs to use that standard https://gerrit.wikimedia.org/r/#/c/45134/

So this is now implemented. If there is anything wrong, we will fill new bugs :)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links