Page MenuHomePhabricator

Cosmos skin: Fix all remaining PHPCS issues
Open, Stalled, LowPublic

Description

We have PHPCS setup now in https://gerrit.wikimedia.org/r/c/mediawiki/skins/Cosmos/+/633045, with some issues fixed so far. There's still much more left though. Let's work on enabling all of these.

  • Merged: patchset 633316
    • Generic.Arrays.DisallowLongArraySyntax.Found
    • Generic.Functions.FunctionCallArgumentSpacing.SpaceBeforeComma
    • Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
  • Merged: patchset 633302
    • Generic.PHP.ForbiddenFunctions.FoundWithAlternative
    • MediaWiki.Usage.ForbiddenFunctions.sizeof
  • Merged: patchset 633305
    • Generic.ControlStructures.InlineControlStructure.NotAllowed
    • MediaWiki.ControlStructures.IfElseStructure.SpaceBeforeElse
  • Merged: patchset 633050
    • MediaWiki.Classes.UnusedUseStatement.UnnecessaryUse
    • MediaWiki.Classes.UnsortedUseStatements.UnsortedUse
    • MediaWiki.Classes.UnusedUseStatement.UnusedUse
  • Merged: patchset 633324
    • MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment
    • MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment
  • Merged: patchset 633289
    • PSR12.Files.ImportStatement.LeadingSlash
    • PSR12.Properties.ConstantVisibility.NotFound
  • Merged: patchset 633051
    • PSR2.Classes.PropertyDeclaration.ScopeMissing
    • PSR2.ControlStructures.ElseIfDeclaration.NotAllowed
    • PSR2.Files.EndFileNewline.TooMany
    • PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose
    • PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter
    • PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse
  • Merged: patchset 633290
    • Squiz.Classes.SelfMemberReference.SpaceBefore
    • Squiz.Classes.SelfMemberReference.NotUsed

Event Timeline

SamanthaNguyen renamed this task from Fix all remaining PHPCS issues to Cosmos skin: Fix all remaining PHPCS issues.Oct 9 2020, 4:27 AM
SamanthaNguyen triaged this task as Medium priority.
SamanthaNguyen created this task.

Change 633289 had a related patch set uploaded (by SamanthaNguyen; owner: SamanthaNguyen):
[mediawiki/skins/Cosmos@master] PHPCS: Fix styling issues related to PSR-12 standard sniffs

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

Change 633289 merged by jenkins-bot:
[mediawiki/skins/Cosmos@master] PHPCS: Fix styling issues related to PSR-12 standard sniffs

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

Change 633290 had a related patch set uploaded (by SamanthaNguyen; owner: SamanthaNguyen):
[mediawiki/skins/Cosmos@master] PHPCS: Fix styling issues related to self member references

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

Change 633290 merged by jenkins-bot:
[mediawiki/skins/Cosmos@master] PHPCS: Fix styling issues related to self member references

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

Change 633302 had a related patch set uploaded (by SamanthaNguyen; owner: SamanthaNguyen):
[mediawiki/skins/Cosmos@master] PHPCS: Fix styling issues related to forbidden PHP functions

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

Change 633305 had a related patch set uploaded (by SamanthaNguyen; owner: SamanthaNguyen):
[mediawiki/skins/Cosmos@master] PHPCS: Fix most styling issues related to control structures

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

Change 633302 merged by jenkins-bot:
[mediawiki/skins/Cosmos@master] PHPCS: Fix styling issues related to forbidden PHP functions

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

Change 633305 merged by jenkins-bot:
[mediawiki/skins/Cosmos@master] PHPCS: Fix most styling issues related to control structures

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

Change 633316 had a related patch set uploaded (by SamanthaNguyen; owner: SamanthaNguyen):
[mediawiki/skins/Cosmos@master] PHPCS: Fix most styling issues related to generic sniffs

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

Change 633317 had a related patch set uploaded (by SamanthaNguyen; owner: SamanthaNguyen):
[mediawiki/skins/Cosmos@master] PHPCS: Fix undeclared visibility on methods

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

Change 633316 merged by jenkins-bot:
[mediawiki/skins/Cosmos@master] PHPCS: Fix most styling issues related to generic sniffs

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

Change 633317 merged by jenkins-bot:
[mediawiki/skins/Cosmos@master] PHPCS: Fix undeclared visibility on methods

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

Change 633318 had a related patch set uploaded (by SamanthaNguyen; owner: SamanthaNguyen):
[mediawiki/skins/Cosmos@master] PHPCS: Fix styling issues related to empty lines

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

Change 633318 merged by jenkins-bot:
[mediawiki/skins/Cosmos@master] PHPCS: Fix styling issues related to empty lines

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

Change 633324 had a related patch set uploaded (by SamanthaNguyen; owner: SamanthaNguyen):
[mediawiki/skins/Cosmos@master] PHPCS: Fix spacing issues in single-lined comments

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

Change 633324 merged by jenkins-bot:
[mediawiki/skins/Cosmos@master] PHPCS: Fix spacing issues in single-lined comments

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

  • the Generic.Files.LineLength.TooLong will need to be manually fixed, same with the MediaWiki.Commenting.* sniffs
  • the SpaceyParenthesis sniffs can be auto-fixed but needs careful review since it will end up fixing at least ~2600+ detected errors
  • the rest of the Squiz sniffs are auto-fixable, and can maybe be all done in one patch (depends how many fixes there are, if it's like the SpaceyParenthesis sniffs, then it will need to be split up)
  • MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures needs manually fixing
  • MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName needs manually fixing

Except MediaWiki.Commenting.FunctionAnnotations.UnrecognizedAnnotation, which can be auto-fixed

Change 633360 had a related patch set uploaded (by SamanthaNguyen; owner: SamanthaNguyen):
[mediawiki/skins/Cosmos@master] PHPCS: Enable all Squiz standard sniffs and auto-fix styling issues

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

Change 633362 had a related patch set uploaded (by SamanthaNguyen; owner: SamanthaNguyen):
[mediawiki/skins/Cosmos@master] PHPCS: Fix styling issues for spaces and parentheses

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

Change 633360 merged by jenkins-bot:
[mediawiki/skins/Cosmos@master] PHPCS: Enable all Squiz standard sniffs and auto-fix styling issues

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

Change 633362 merged by jenkins-bot:
[mediawiki/skins/Cosmos@master] PHPCS: Fix styling issues for spaces and parentheses

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

Change 633375 had a related patch set uploaded (by SamanthaNguyen; owner: SamanthaNguyen):
[mediawiki/skins/Cosmos@master] PHPCS: Fix name casing of methods, remove unrecognized PHP annotation

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

Change 633375 merged by jenkins-bot:
[mediawiki/skins/Cosmos@master] PHPCS: Fix name casing of methods, remove unrecognized PHP annotation

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

Change 633384 had a related patch set uploaded (by SamanthaNguyen; owner: SamanthaNguyen):
[mediawiki/skins/Cosmos@master] PHPCS: Fix all MediaWiki function comment styling issues

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

Change 633384 merged by jenkins-bot:
[mediawiki/skins/Cosmos@master] PHPCS: Fix all MediaWiki function comment styling issues

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

SamanthaNguyen changed the task status from Open to Stalled.Oct 15 2020, 11:15 PM

This is now stalled as this requires fixing MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures, which requires refactoring CosmosSocialProfile::getMostWantedPages()

SamanthaNguyen lowered the priority of this task from Medium to Low.Oct 17 2020, 6:56 PM

Not as high of a priority now, since most are done. (not all are done yet, just two left)