[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Page MenuHomePhabricator

Fix codesniffer sniffs disabled with the update to 0.9
Closed, ResolvedPublic2 Estimated Story Points

Description

Codesniffer helps us write better code, that's better documented. Right now we're not reaping its full benefits.

From build: Updating mediawiki/mediawiki-codesniffer to 0.9.0

The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Plan (YMMV)

  • Enable sniffs one by one and send patches fixing the problems

AC

  • As many of the sniffs are made to pass as is possible.
  • If a sniff can't be made to pass for some reason, then document it as close as possible to the line disabling the sniff.

Developer notes

The latest version fo mediawiki-codesniffer is 0.10.0 -> it would be nice to update and verify everything works on latest code sniffer

Event Timeline

Jdlrobson triaged this task as Medium priority.Jun 20 2017, 4:05 PM
Jdlrobson added a project: good first task.
Jdlrobson renamed this task from Fix codesniffer sniffs disabled with the udpate to 0.9 to Fix codesniffer sniffs disabled with the update to 0.9.Jun 21 2017, 6:54 PM
Jdlrobson lowered the priority of this task from Medium to Low.
Jdlrobson added a project: patch-welcome.
Jdlrobson updated the task description. (Show Details)
Jdlrobson raised the priority of this task from Low to Medium.Jun 28 2017, 6:50 PM
Jdlrobson subscribed.

bumping visibility

Jdlrobson set the point value for this task to 2.Jul 12 2017, 5:26 PM

I'm picking this task as a time-filler for today

Change 364843 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/extensions/Popups@master] Re-enable MediaWiki.Commenting.FunctionComment.MissingParamComment sniff

https://gerrit.wikimedia.org/r/364843

Change 364845 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/extensions/Popups@master] Re-enable MediaWiki.Commenting.FunctionComment.MissingParamTag sniff

https://gerrit.wikimedia.org/r/364845

Change 364846 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/extensions/Popups@master] Re-enable MediaWiki.Commenting.FunctionComment.MissingReturn sniff

https://gerrit.wikimedia.org/r/364846

Change 364850 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/extensions/Popups@master] Re-enable MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic sniff

https://gerrit.wikimedia.org/r/364850

Change 364851 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/extensions/Popups@master] Re-enable MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment sniff

https://gerrit.wikimedia.org/r/364851

Many different extensions (MobileFrontend, TextExtracts, Popups) have many disabled sniffs. Some extensions (BetaFeatures, PageImages) do not have phpcs config at all. I'll create tasks accordingly as it's too much work to fix everything in this task.

I'll also bind this task with T162936 as it is improving developer happiness.

Change 364843 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Re-enable MediaWiki.Commenting.FunctionComment.MissingParamComment sniff

https://gerrit.wikimedia.org/r/364843

Change 364845 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Re-enable MediaWiki.Commenting.FunctionComment.MissingParamTag sniff

https://gerrit.wikimedia.org/r/364845

Many different extensions (MobileFrontend, TextExtracts, Popups) have many disabled sniffs. Some extensions (BetaFeatures, PageImages) do not have phpcs config at all. I'll create tasks accordingly as it's too much work to fix everything in this task.

Good idea. I also thought this task was only about page previews.

@bmansurov - you're right, in this task we had to fix PagePreviews code. I decided to check other extensions as fixing those could be quick and simple (this task took me less than an hour), but for an example, only MobileFrontend validation returned over 100 errors (I didn't count them but it was lots of scrolling ).

Change 364851 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Re-enable MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment sniff

https://gerrit.wikimedia.org/r/364851

Change 364846 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Re-enable MediaWiki.Commenting.FunctionComment.MissingReturn sniff

https://gerrit.wikimedia.org/r/364846

Change 364850 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Re-enable MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic sniff

https://gerrit.wikimedia.org/r/364850

phuedx added subscribers: pmiazga, phuedx.

This task needs a Signer Offerer.

Jdlrobson claimed this task.

That will be me :)