Hello, wikitech-l,
tl;dr trying to make mw-core pass mw-codesniffer, expect large patches on Gerrit, and please help
A lot of work has been done on MediaWiki codesniffer https://phabricator.wikimedia.org/tag/mediawiki-codesniffer/ (the PHP_CodeSniffer standard for MediaWiki) over the last few months and this might be a good time to get core to pass our coding conventions https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP.
Work on this has already started at T102609 https://phabricator.wikimedia.org/T102609. There were two primary reasons to send this email:
1. This is a pretty big task and any help would be very welcome! If we can get phpcs to run against core's master, it would make every patch contributors' work a little easier.
2. Work is being organized as subtasks of T102609, and has been divided on the basis of sniffs. Because of this, every patch is going to change a lot of unrelated files and a lot of reviewers are going to get added on Gerrit.
Let's make this happen!
Vivek Ghaisas (polybuildr)
Hi,
On 06/16/2015 07:19 AM, Vivek Ghaisas wrote:
Hello, wikitech-l,
tl;dr trying to make mw-core pass mw-codesniffer, expect large patches on Gerrit, and please help
I've tried out a different approach in https://gerrit.wikimedia.org/r/#/c/241085/, by disabling all the failing rules. This will let us make the rules that do pass voting (e.g. no closing ?> tags), and we can selectively enable failing rules instead of trying to make giant patches and hope no one introduces regressions while it's still non-voting.
Thoughts?
-- Legoktm
On Fri, Sep 25, 2015 at 2:08 PM, Legoktm legoktm.wikipedia@gmail.com wrote:
I've tried out a different approach in https://gerrit.wikimedia.org/r/#/c/241085/, by disabling all the failing rules. This will let us make the rules that do pass voting (e.g. no closing ?> tags), and we can selectively enable failing rules instead of trying to make giant patches and hope no one introduces regressions while it's still non-voting.
Very much agree with this post. I have worked on phpcs compliance on other projects at my company, and we have found it vastly easier to stage-in over time, that way at the very least additional errors are not accidentally introduced.
*-- * *Tyler Romeo* Stevens Institute of Technology, Class of 2016 Major in Computer Science
I have filed a task about this at https://phabricator.wikimedia.org/T113774
On Friday, 25 September 2015, 22:45, Tyler Romeo tylerromeo@gmail.com wrote:
On Fri, Sep 25, 2015 at 2:08 PM, Legoktm legoktm.wikipedia@gmail.com wrote:
I've tried out a different approach in https://gerrit.wikimedia.org/r/#/c/241085/, by disabling all the failing rules. This will let us make the rules that do pass voting (e.g. no closing ?> tags), and we can selectively enable failing rules instead of trying to make giant patches and hope no one introduces regressions while it's still non-voting.
Very much agree with this post. I have worked on phpcs compliance on other projects at my company, and we have found it vastly easier to stage-in over time, that way at the very least additional errors are not accidentally introduced.
*-- * *Tyler Romeo* Stevens Institute of Technology, Class of 2016 Major in Computer Science _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
This is also the approach we have just taken on the Wikibase codebase. It worked very well!
On 25 September 2015 at 22:45, Tyler Romeo tylerromeo@gmail.com wrote:
On Fri, Sep 25, 2015 at 2:08 PM, Legoktm legoktm.wikipedia@gmail.com wrote:
I've tried out a different approach in https://gerrit.wikimedia.org/r/#/c/241085/, by disabling all the failing rules. This will let us make the rules that do pass voting (e.g. no closing ?> tags), and we can selectively enable failing rules instead of trying to make giant patches and hope no one introduces regressions while it's still non-voting.
Very much agree with this post. I have worked on phpcs compliance on other projects at my company, and we have found it vastly easier to stage-in over time, that way at the very least additional errors are not accidentally introduced.
*-- * *Tyler Romeo* Stevens Institute of Technology, Class of 2016 Major in Computer Science _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org