File: phpcs.xml

package info (click to toggle)
matomo 5.5.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 73,596 kB
  • sloc: php: 231,041; javascript: 102,286; python: 202; xml: 189; sh: 172; makefile: 20; sql: 10
file content (36 lines) | stat: -rw-r--r-- 1,623 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0"?>
<ruleset name="matomo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">

    <description>Matomo Core Coding Standard</description>

    <arg name="extensions" value="php" />

    <file>core</file>
    <file>plugins</file>
    <file>tests/PHPUnit</file>

    <exclude-pattern>tests/PHPUnit/proxy/*</exclude-pattern>
    <exclude-pattern>tests/PHPUnit/Unit/Config/test_files/*</exclude-pattern>
    <exclude-pattern>tests/javascript/*</exclude-pattern>

    <!-- exclude all plugins included as submodule as long as they might not fully follow this CS -->
    <exclude-pattern>plugins/(AnonymousPiwikUsageMeasurement|Bandwidth|CustomAlerts|CustomVariables|DeviceDetectorCache|LogViewer|LoginLdap|MarketingCampaignsReporting|Provider|QueuedTracking|SecurityInfo|TagManager|TasksTimetable|TrackingSpamPrevention|TreemapVisualization|VisitorGenerator)/*</exclude-pattern>

    <rule ref="Matomo"></rule>

    <rule ref="Generic.Files.LineLength">
        <properties>
            <property name="lineLimit" value="400"/>
        </properties>
        <exclude-pattern>tests/PHPUnit/*</exclude-pattern>
        <exclude-pattern>plugins/*/tests/*</exclude-pattern>
    </rule>

    <rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
        <!-- Allow using multiple classes in one file for tests -->
        <exclude-pattern>tests/PHPUnit/*</exclude-pattern>
        <exclude-pattern>plugins/*/tests/*</exclude-pattern>
    </rule>

    <rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"></rule>
</ruleset>