The bootstrap in mediawiki-codesniffer is broken, because it was not
adjust when PHP CodeSniffer Version 3.0.0 was used. Remove the broken
bootstap.
Bug: T172933
Change-Id: I29e776662055077f6de3a9bc6d0869120b387ea7
For some varargs a variable name is added with suffix ,... as seen for
many other varargs
Some @param are swapped, because there are in the wrong order
Enable Sniff MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
Change-Id: I60fec6025bce824d5c67563ab7b65ad6cd628ad8
Reenable MediaWiki.WhiteSpace.SpaceBeforeClassBrace.NoSpaceBeforeBrace,
because the mentioned bug is fixed
Bug: T172933
Change-Id: I1593bdba2295ebed401b921f2beabed69dba7638
And auto-fix all errors.
The `<exclude-pattern>` stanzas are now included in the default ruleset
and don't need to be repeated.
Change-Id: I928af549dc88ac2c6cb82058f64c7c7f3111598a
The used phpcs has a bug, so the version 0.9.0 could not be enforced at the moment.
Will be fixed in next version, see T167168
Changed:
- Remove duplicate newline at end of file
- Add space between function and ( for closures
- and -> &&, or -> ||
Change-Id: I4172fb08861729bccd55aecbd07e029e2638d311
Explicitly stating the current directory fixes the ambiguity
of finding the ruleset referred to in the file. This allows
syntax checkers like flycheck (for GNU Emacs) to work.
Change-Id: I6b046db29d11aff514d8f3623d049f5b6231a9d4
Since the match can be case-insensitive (apparently), this meant
ExtensionsTestSuite.php ("extensions") wasn't being validated either.
Bug: T127238
Change-Id: I679de924ebeb45150004783ce404fac92af026a7
* 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
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
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
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