PHPCodeSniffer helps us stick to same coding standards across MediaWiki and it's extensions. Currently BetaFeatures phpcs config differs from the MediaWiki one - the following sniffs are disabled:
Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase MediaWiki.Commenting.FunctionComment.MissingParamComment MediaWiki.Commenting.FunctionComment.MissingParamName MediaWiki.Commenting.FunctionComment.MissingParamTag MediaWiki.Commenting.FunctionComment.MissingReturn MediaWiki.Commenting.FunctionComment.ParamNameNoMatch MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment
Runing phpcs without those sniffs gives 42 errors and 1 warnings in 12 files.
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.