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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 30 2020, 12:39 AM
srishakatux updated the task description. (Show Details)Feb 5 2020, 1:26 AM

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

Prondubuisi added a subscriber: Prondubuisi.EditedFeb 11 2020, 6:26 PM

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

DannyS712 updated the task description. (Show Details)Feb 12 2020, 4:23 AM
DannyS712 added a subscriber: DannyS712.

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

Soda added a subscriber: Soda.Feb 23 2020, 3:37 PM

@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..

Prondubuisi added a comment.EditedFeb 29 2020, 1:00 PM

@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

Soda added a comment.Feb 29 2020, 1:58 PM

@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!

Samwilson updated the task description. (Show Details)Mar 3 2020, 8:42 AM

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!

Prondubuisi updated the task description. (Show Details)Mar 6 2020, 2:02 AM
Soda added a comment.Mar 6 2020, 5:31 AM

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

Samwilson updated the task description. (Show Details)Mar 10 2020, 12:24 AM

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

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

Samwilson updated the task description. (Show Details)Mar 25 2020, 2:29 AM

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

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

Samwilson closed this task as Resolved.May 11 2020, 7:10 AM
Samwilson claimed this task.
Samwilson updated the task description. (Show Details)

All done! Thanks everyone.