Skip to content

Commit 08fa802

Browse files
committed
Improve phpcs config
* exclude `node_modules/` files from `.phpcs.xml` * add missing `repo/rest-api` dir to `prpl-ruleset.xml` Change-Id: Ifdcbf932c6e5c023d1fed9947feafd4179ce200d
1 parent e02574b commit 08fa802

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.phpcs.xml

+1
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,5 @@
115115
<exclude-pattern>.phan/stubs</exclude-pattern>
116116
<exclude-pattern>repo/tests/browser</exclude-pattern>
117117
<exclude-pattern type="relative">^extensions/</exclude-pattern>
118+
<exclude-pattern>node_modules/</exclude-pattern>
118119
</ruleset>

prpl-ruleset.xml

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
2828
<properties>
2929
<property name="rootNamespaces" type="array">
30+
<element key="repo/rest-api/src" value="Wikibase\Repo\RestApi"/>
31+
<element key="repo/rest-api/tests/phpunit" value="Wikibase\Repo\Tests\RestApi"/>
3032
<element key="repo/domains/search/src" value="Wikibase\Repo\Domains\Search"/>
3133
<element key="repo/domains/search/tests/phpunit" value="Wikibase\Repo\Tests\Domains\Search"/>
3234
<element key="repo/domains/crud/src" value="Wikibase\Repo\Domains\Crud"/>
@@ -49,9 +51,10 @@
4951
</properties>
5052
</rule>
5153

54+
<file>repo/rest-api</file>
5255
<file>repo/domains/crud</file>
5356
<file>repo/domains/search</file>
5457
<arg name="tab-width" value="4" />
5558
<arg name="extensions" value="php" />
56-
<exclude-pattern>node_modules/*</exclude-pattern>
59+
<exclude-pattern>node_modules/</exclude-pattern>
5760
</ruleset>

0 commit comments

Comments
 (0)