Page MenuHomePhabricator

Re-enable codesniffer sniffs disabled in TweetANew
Closed, ResolvedPublic

Description

TweetANew extension will be pushed with PHP Code Sniffer which is a new thing for this repository. It consists of really bloated code, any CS guidelines almost doesn't exist here. I've added this Code Sniffer along with a bunch of <exclude>s to make patch pass Jenkins, but we need to improve that legacy code style with MediaWiki standard.

These are the sniffs that need to be fixed and removed:

  • Generic.Arrays.DisallowLongArraySyntax.Found
  • Generic.ControlStructures.InlineControlStructure.NotAllowed
  • Generic.Files.LineLength.TooLong
  • Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterComma
  • Generic.PHP.NoSilencedErrors.Discouraged
  • Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
  • MediaWiki.AlternativeSyntax.AlternativeSyntax.AlternativeSyntax
  • MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
  • MediaWiki.Commenting.FunctionComment.MissingParamComment
  • MediaWiki.Commenting.FunctionComment.MissingParamName
  • MediaWiki.Commenting.FunctionComment.MissingParamTag
  • MediaWiki.Commenting.FunctionComment.MissingReturn
  • MediaWiki.Commenting.FunctionComment.NotShortBoolParam
  • MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
  • MediaWiki.Commenting.FunctionComment.SpacingBeforeParamType
  • MediaWiki.ControlStructures.IfElseStructure.SpaceAfterElse
  • MediaWiki.ControlStructures.IfElseStructure.SpaceBeforeElse
  • MediaWiki.Files.ClassMatchesFilename.NotMatch
  • MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
  • MediaWiki.WhiteSpace.DisallowEmptyLineFunctions.NoEmptyLine
  • MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment
  • MediaWiki.WhiteSpace.SpaceyParenthesis.SingleSpaceAfterOpenParenthesis
  • MediaWiki.WhiteSpace.SpaceyParenthesis.SingleSpaceBeforeCloseParenthesis
  • PSR2.Classes.PropertyDeclaration.Underscore
  • Squiz.Classes.ValidClassName.NotCamelCaps
  • Squiz.Operators.ValidLogicalOperators.NotAllowed

Event Timeline

Hmm, I wonder how maintained TweetANew is, and how large a chunk of work should be here. Input very welcome so we can turn this into 1 or more GCI tasks.

Kizule updated the task description. (Show Details)
Kizule added a subscriber: Kizule.