aboutsummaryrefslogtreecommitdiffstats
path: root/phpcs.xml
Commit message (Collapse)AuthorAgeFilesLines
* Have phpcs skip local configuration filesBrad Jorsch2016-11-221-0/+3
| | | | | | | There's little point in phpcs checking LocalSettings.php or the other *.php files in .gitignore. Change-Id: Ibea15a3f3a7bfe2571e253ba9e19c1d91dfddeff
* build: Ignore phpcs in /skins but not /includes/skinsTimo Tijhof2016-03-041-4/+4
| | | | | | | | Since the match can be case-insensitive (apparently), this meant ExtensionsTestSuite.php ("extensions") wasn't being validated either. Bug: T127238 Change-Id: I679de924ebeb45150004783ce404fac92af026a7
* build: Update mediawiki-codesniffer to 0.6.0, add "composer fix"Kunal Mehta2016-02-171-5/+0
| | | | | | | | | | * Fix errors spotted by new release * Introduce "composer fix", which uses phpcbf to automatically fix some errors spotted by phpcs. * Drop $PHPCS_ARGS variable that didn't work on Windows, and add -s flag * Remove rules from phpcs.xml that are now in MW-CS ruleset. Change-Id: I13e2155695918c918b67497ac65b85a03897095e
* Convert all array() syntax to []Kunal Mehta2016-02-171-0/+5
| | | | | | | | | | Per wikitech-l consensus: https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html Notes: * Disabled CallTimePassByReference due to false positives (T127163) Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
* build: Update mediawiki/mediawiki-codesniffer to 0.5.1Paladox2016-01-021-0/+7
| | | | | | | | | Two rules are ignored for now to allow us to upgrade: * MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures * Generic.ControlStructures.InlineControlStructure.NotAllowed Also ignore the .git folder. Change-Id: I1b149c72b27be54e22e369999ad0c41c2d1fc2b4
* Re-enable last phpcs ruleReedy2015-10-141-4/+1
| | | | | Bug: T102609 Change-Id: I49eb778ccb5f0a3662fe4573872d1235c52fdd81
* Enable Squiz.Classes.ValidClassName.NotCamelCapsumherirrender2015-10-101-1/+0
| | | | Change-Id: Ie413b403992ba8598b3dea03adc9733c30414fe9
* Enable PSR2.Methods.MethodDeclaration.Underscoreumherirrender2015-10-061-1/+3
| | | | | | Whitelist StubObject because the underscore is for internal use. Change-Id: I4beeee8df8cde079b810a372539e3c169e80f2d3
* Reenable LineLength phpcs checkAmir E. Aharoni2015-10-061-1/+0
| | | | | Bug: T102614 Change-Id: If853510b55d787765a84bac22b2dbff2e6c526c0
* Enable MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefixumherirrender2015-10-031-1/+0
| | | | | | | Should work after Ie094f78781b2d6f7af1a0f1eea1f7ea4d0b9c69c Bug: T104501 Change-Id: I1e3e8a1480b822272c762f2771d8554980c32c1b
* Enable Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsedumherirrender2015-10-031-1/+0
| | | | | | | All remaining lines should be fixed now Bug: T113854 Change-Id: I85269d4c84ae3a676a773e24b0a96a4e7a89ac38
* Re-enable WhiteSpace.SpaceBeforeSingleLineComment sniffVivek Ghaisas2015-09-271-1/+0
| | | | | | | Enable only the SingleSpaceBeforeSingleLineComment part, not the EmptyComment part. Change-Id: I98f2d6d401745d8aaacaca115789eb15b81c6813
* Disable EmptyComment and SingleSpaceBeforeSingleLineComment code sniffersReedy2015-09-261-0/+2
| | | | | | Lots of warnings to be fixed in core Change-Id: I9041ead57c2225cd618501d4998ceb85e9cb3c1b
* Add ignoreList for valid global variable name sniff in phpcs.xmlVivek Ghaisas2015-09-271-0/+5
| | | | | | | | | The list of variables to ignore was hardcoded in the sniff. Moving it to the phpcs.xml file allows setting it on a per-project basis, and hence, should be set in core's phpcs.xml. Bug: T104501 Change-Id: I6909b1d3845ba72d867fe01e86bd4a8f6bef198f
* Add ignoreList for prefixed functions sniff in phpcs.xmlVivek Ghaisas2015-09-271-0/+5
| | | | | | | | | Certain unprefixed global functions have been in the codebase from a long time and prefixing them could cause errors. The prefixed functions sniff allows an ignoreList to be set in phpcs.xml. Bug: T104501 Change-Id: Ie094f78781b2d6f7af1a0f1eea1f7ea4d0b9c69c
* Re-enable MediaWiki.WhiteSpace.SpaceAfterControlStructure.IncorrectReedy2015-09-261-1/+0
| | | | Change-Id: I1b756909a1080108c5147d46950f826871ef6dc1
* Merge "Re-enable Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed"jenkins-bot2015-09-261-1/+0
|\
| * Re-enable Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowedReedy2015-09-261-1/+0
| | | | | | | | Change-Id: I07b4043163e5d00709f72dbbb3e2a46b17414d1c
* | Merge "Re-enable Squiz.WhiteSpace.SemicolonSpacing.Incorrect"jenkins-bot2015-09-261-1/+0
|\ \
| * | Re-enable Squiz.WhiteSpace.SemicolonSpacing.IncorrectReedy2015-09-261-1/+0
| |/ | | | | | | Change-Id: Ie86c512fbca07f41b252d95de3ab92da3a050e72
* | Merge "Re-enable ↵jenkins-bot2015-09-261-1/+0
|\ \ | |/ |/| | | MediaWiki.WhiteSpace.SpaceyParenthesis.SingleSpaceBeforeCloseParenthesis"
| * Re-enable ↵Reedy2015-09-261-1/+0
| | | | | | | | | | | | MediaWiki.WhiteSpace.SpaceyParenthesis.SingleSpaceBeforeCloseParenthesis Change-Id: I8482f5dd9d79e4946e862b0ac03bd027d62e8646
* | Merge "Re-enable Squiz.WhiteSpace.ScopeClosingBrace.Indent"jenkins-bot2015-09-261-1/+0
|\ \ | |/ |/|
| * Re-enable Squiz.WhiteSpace.ScopeClosingBrace.IndentReedy2015-09-261-1/+0
| | | | | | | | Change-Id: I743c4ce019321d631c0a11ee2112fe9aa8ba4c5d
* | Re-enable MediaWiki.WhiteSpace.SpaceyParenthesis.SingleSpaceAfterOpenParenthesisReedy2015-09-261-1/+0
|/ | | | | | Fixed some SingleSpaceBeforeCloseParenthesis too Change-Id: I1695c706a9b23ab98074ff7d6a3687eb5cdce6e7
* Re-enable PSR2.Methods.MethodDeclaration.AbstractAfterVisibilityReedy2015-09-261-1/+0
| | | | Change-Id: I50a987edf03cb19bfd707cd00c143c3665eba94f
* Merge "Re-enable PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter"jenkins-bot2015-09-261-1/+0
|\
| * Re-enable PSR2.Namespaces.NamespaceDeclaration.BlankLineAfterReedy2015-09-261-1/+0
| | | | | | | | Change-Id: I39f71dde31f3ec18ab06904692f6a4ffd454d4d1
* | Merge "Re-enable Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines"jenkins-bot2015-09-261-1/+0
|\ \
| * | Re-enable Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLinesReedy2015-09-261-1/+0
| | | | | | | | | | | | | | | | | | Add extra whitespace line too Change-Id: Ia33c9b63c36f121e5e9283c6d4a2b024a1821a43
* | | Merge "Re-enable PSR2.Methods.MethodDeclaration.StaticBeforeVisibility"jenkins-bot2015-09-261-1/+0
|\ \ \ | |_|/ |/| |
| * | Re-enable PSR2.Methods.MethodDeclaration.StaticBeforeVisibilityReedy2015-09-261-1/+0
| |/ | | | | | | Change-Id: Id3e4bc5d7e4d1b8003f9f6b324e2321b5af1771f
* | Merge "Re-enable Generic.Files.EndFileNewline.NotFound"jenkins-bot2015-09-261-1/+0
|\ \
| * | Re-enable Generic.Files.EndFileNewline.NotFoundReedy2015-09-261-1/+0
| |/ | | | | | | Change-Id: Ib84ce8dc973f7e3fe688435a72f7936342b6f2dd
* / Re-enable MediaWiki.VariableAnalysis.UnusedGlobalVariablesReedy2015-09-261-1/+0
|/ | | | | | Globals are used in included file, so ignore warning in this case Change-Id: I50315425827cc49eac3ca943a5a8952d0292ce23
* phpcs: Disable failing sniffs in phpcs.xmlKunal Mehta2015-09-261-1/+20
| | | | | | | | This allows us to make PHPCS voting, and enable the failing rules individually when once their issues are fixed. Bug: T102609 Change-Id: I6731d2d07bbd89d424a660ceb7aee4c0392500d3
* Ignore languages/messages/Messages*.php in line length sniffVivek Ghaisas2015-09-011-0/+3
| | | | | | | | | Most of these files have very long lines, but that makes them easier to read. Also, they're generated from a script. It's probably a better idea to ignore their lengths than to change the lengths. Bug: T103806 Change-Id: Ic6860520e4cc76f93aa13c364aae11cf14f279d0
* build: Move PHPCS configuration to phpcs.xmlKunal Mehta2015-07-091-0/+11
"composer phpcs" now runs PHPCS against the relevant directories. Change-Id: Ic28eaff2318fa57977689957781538acb2b1893c