Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2022-03-10 23:08:31 +0300
committerGitHub <noreply@github.com>2022-03-10 23:08:31 +0300
commitc11469e4199405628e97650914f0cdbdea94dac7 (patch)
treeaf07edd44b6ac95fa3cd6e439d435cf6c55e9ad5 /phpcs.xml
parent05082abdca8909cf27137773f129cf66f495922b (diff)
[Codingstyle] Disallow unused use statements (#18520)
* Forbid unused use statements * Fix some incorrect classnames * fix tests * remove unused use statements
Diffstat (limited to 'phpcs.xml')
-rw-r--r--phpcs.xml12
1 files changed, 12 insertions, 0 deletions
diff --git a/phpcs.xml b/phpcs.xml
index 65da90b5b5..daa162365b 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -10,6 +10,7 @@
<file>tests/PHPUnit</file>
<exclude-pattern>tests/PHPUnit/proxy/*</exclude-pattern>
+ <exclude-pattern>tests/javascript/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/libs/*</exclude-pattern>
@@ -26,6 +27,17 @@
<!-- Forbid inline control structures -->
<rule ref="Generic.ControlStructures.InlineControlStructure" />
+ <!-- Forbid unused use statements -->
+ <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
+ <properties>
+ <property name="searchAnnotations" value="true"/>
+ <property name="ignoredAnnotations" type="array">
+ <element value="@group"/>
+ <element value="@api"/>
+ </property>
+ </properties>
+ </rule>
+
<!-- Forbid some functions that should not be used (directly) -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>