Page MenuHomePhabricator

Fix phpcs exclusions (8 microtasks)
Closed, ResolvedPublic

Description

There are a few coding style exclusions that should be fixed in ProofreadPage:

  • MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate
  • MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected
  • MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
  • MediaWiki.Commenting.FunctionComment.MissingParamTag
  • MediaWiki.Commenting.FunctionComment.MissingReturn
  • MediaWiki.Files.ClassMatchesFilename.NotMatch
  • MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment
  • PSR12.Properties.ConstantVisibility.NotFound

For each exclusion, remove it from .phpcs.xml and fix the code accordingly so that ./vendor/bin/phpcs runs without error. Each should be submitted as a separate patch to make it easier to review.

Getting Started Resources

Event Timeline

Change 571549 had a related patch set uploaded (by Prondubuisi; owner: Prondubuisi):
[mediawiki/extensions/ProofreadPage@master] Phpcs: fix excluded protected documentation error

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

Hello @Samwilson I am A student interested in GSoC, and I have proposed a fix for one of the PHPcs issues, thanks.

Change 571549 merged by jenkins-bot:
[mediawiki/extensions/ProofreadPage@master] Phpcs: fix excluded protected documentation error

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

Change 572136 had a related patch set uploaded (by Prondubuisi; owner: Prondubuisi):
[mediawiki/extensions/ProofreadPage@master] Phpcs : fix Private function documention error

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

Change 574224 had a related patch set uploaded (by Sohom Datta; owner: Sohom Datta):
[mediawiki/extensions/ProofreadPage@master] Fixed missing public function documentation error

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

@Jayprakash12345 Could you guide me on how to fix the errors that came up in the checking build.... I am unable to reproduce them locally using docker-dev, there are no errors given by composer or npm and I can't figure out what phan does or how to install it..

@Soda Could you guide me on how to fix the errors that came up in the checking build.... I am unable to reproduce them locally using docker-dev, there are no errors given by composer or npm and I can't figure out what phan does or how to install it..

Hello @Jayprakash12345 this is a guide on setting on Phan locally https://www.mediawiki.org/wiki/Continuous_integration/Phan#Running_Phan

@Prondubuisi Thanks for the help. I realised where I messed up. Commit updated. BTW, I was asking for advice, Jayprakash was rechecking my patch via Jenkin's Bot... 😄

@Prondubuisi Thanks for the help. I realised where I messed up. Commit updated. BTW, I was asking for advice, Jayprakash was rechecking my patch via Jenkin's Bot... 😄

Lol. Senior Developer problems!

I don't see so much exclusions from description, in .phpcs.xml. https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/ProofreadPage/+/574224/2/.phpcs.xml

I've updated the list in the task description (a few have been done already).

Change 572136 merged by jenkins-bot:
[mediawiki/extensions/ProofreadPage@master] Phpcs : fix Private function documention error

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

Change 577342 had a related patch set uploaded (by Prondubuisi; owner: Prondubuisi):
[mediawiki/extensions/ProofreadPage@master] PHPcs: T243932 fix phpcs space before single line comment error in different php files where the error occurs

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

Hello @Samwilson can I edit the task description to tick the tasks that have been merged?

Hello @Samwilson can I edit the task description to tick the tasks that have been merged?

Yes, definitely; thanks!

I've rebased my patch on the latest version ( it was merge-conflicting ) @Samwilson could you take a look at it....

Change 577413 had a related patch set uploaded (by Prondubuisi; owner: Prondubuisi):
[mediawiki/extensions/ProofreadPage@master] PHPcs: T243932 fix PHPcs filename and classname mismatch error update relevent bootstrap files to reflect the change

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

Change 577413 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Prondubuisi):
[mediawiki/extensions/ProofreadPage@master] Rename ProofreadPage.body.php to ProofreadPage.php

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

Change 577342 had a related patch set uploaded (by Prondubuisi; owner: Prondubuisi):
[mediawiki/extensions/ProofreadPage@master] PHPcs: Fix Space before single line error

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

Change 577342 merged by jenkins-bot:
[mediawiki/extensions/ProofreadPage@master] PHPcs: Fix Space before single line comment error

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

Change 577413 merged by jenkins-bot:
[mediawiki/extensions/ProofreadPage@master] Rename ProofreadPage.body.php to ProofreadPage.php

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

Change 574224 merged by jenkins-bot:
[mediawiki/extensions/ProofreadPage@master] Fixed missing public function documentation error

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

Samwilson claimed this task.
Samwilson updated the task description. (Show Details)

All done! Thanks everyone.