Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/362611 )
Change subject: Fix exclude of common folders ...................................................................... Fix exclude of common folders The documentation[1] suggest to start with a slash, but that does not work[2]. [1] https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml [2] https://integration.wikimedia.org/ci/job/mediawiki-extensions-hhvm-jessie/17062/console Change-Id: I23bd5e75ff5b964b37775978408df5fcfb8e8657 --- M MediaWiki/ruleset.xml M README.md M composer.json M phpcs.xml 4 files changed, 6 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer refs/changes/11/362611/1 diff --git a/MediaWiki/ruleset.xml b/MediaWiki/ruleset.xml index 65263be..91f7e6d 100644 --- a/MediaWiki/ruleset.xml +++ b/MediaWiki/ruleset.xml @@ -113,8 +113,8 @@ <rule ref="Zend.Files.ClosingTag" /> - <!-- exclude common folder --> - <exclude-pattern type="relative">^/.git</exclude-pattern> - <exclude-pattern type="relative">^/vendor</exclude-pattern> - <exclude-pattern type="relative">^/node_modules</exclude-pattern> + <!-- exclude common folders from version control or build tools --> + <exclude-pattern type="relative">^.git</exclude-pattern> + <exclude-pattern type="relative">^vendor</exclude-pattern> + <exclude-pattern type="relative">^node_modules</exclude-pattern> </ruleset> diff --git a/README.md b/README.md index 1abc85d..8f76690 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ <file>.</file> <arg name="extensions" value="php,php5,inc"/> <arg name="encoding" value="UTF-8"/> - <exclude-pattern>vendor</exclude-pattern> </ruleset> ``` 3. Install: `composer update` diff --git a/composer.json b/composer.json index ccd6cb1..97ff098 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "test": [ "parallel-lint . --exclude vendor", "phpunit $PHPUNIT_ARGS", - "phpcs -p -s" + "phpcs -p -s" ], "fix": "phpcbf" } diff --git a/phpcs.xml b/phpcs.xml index 2d92d4a..c08686e 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -4,6 +4,5 @@ <file>.</file> <arg name="extensions" value="php,php5,inc"/> <arg name="encoding" value="UTF-8"/> - <exclude-pattern>vendor</exclude-pattern> - <exclude-pattern>*/Tests/files/*</exclude-pattern> + <exclude-pattern type="relative">^MediaWiki/Tests/files</exclude-pattern> </ruleset> -- To view, visit https://gerrit.wikimedia.org/r/362611 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23bd5e75ff5b964b37775978408df5fcfb8e8657 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/codesniffer Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits