File: ruleset.xml

package info (click to toggle)
kalkun 0.8.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,340 kB
  • sloc: php: 30,659; javascript: 30,443; sql: 961; sh: 766; xml: 105; makefile: 40
file content (83 lines) | stat: -rw-r--r-- 4,010 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0" encoding="UTF-8" ?>
<ruleset name="CodeIgniter-Kalkun">
    <description>CodeIgniter3 coding standard for Kalkun as described at https://codeigniter.com/userguide3/general/styleguide.html</description>

    <file>../../application</file>

    <exclude-pattern>libraries/abstract.plugins.php</exclude-pattern>
    <exclude-pattern>libraries/b8</exclude-pattern>
    <exclude-pattern>libraries/Plugins_lib.php</exclude-pattern>
    <exclude-pattern>libraries/Plugins_lib_kalkun.php</exclude-pattern>
    <exclude-pattern>libraries/trait.plugins.php</exclude-pattern>
    <exclude-pattern>plugins/jsonrpc/libraries</exclude-pattern>
    <exclude-pattern>plugins/rest_api/libraries</exclude-pattern>
    <exclude-pattern>plugins/sms_to_twitter/libraries/</exclude-pattern>
    <exclude-pattern>plugins/sms_to_wordpress</exclude-pattern>
    <exclude-pattern>plugins/sms_to_xmpp/libraries/</exclude-pattern>
    <exclude-pattern>plugins/soap/libraries</exclude-pattern>
    <exclude-pattern>tests/mocks/libraries</exclude-pattern>
    <exclude-pattern>third_party</exclude-pattern>
    <exclude-pattern>plugins/sms_credit/views</exclude-pattern>
    <exclude-pattern>plugins/sms_to_xmpp/views</exclude-pattern>
    <exclude-pattern>plugins/server_alert/views</exclude-pattern>
    <exclude-pattern>plugins/stop_manager/views</exclude-pattern>
    <exclude-pattern>plugins/sms_to_wordpress/views</exclude-pattern>
    <exclude-pattern>plugins/sms_to_email/views</exclude-pattern>
    <exclude-pattern>plugins/sms_member/views</exclude-pattern>
    <exclude-pattern>plugins/whitelist_number/views</exclude-pattern>
    <exclude-pattern>plugins/sms_to_twitter/views</exclude-pattern>
    <exclude-pattern>plugins/blacklist_number/views</exclude-pattern>
    <exclude-pattern>plugins/soap/views</exclude-pattern>
    <exclude-pattern>tests</exclude-pattern>
    <exclude-pattern>views</exclude-pattern>

    <rule ref="CodeIgniter">
        <exclude name="CodeIgniter.Files.ClosingLocationComment"/>
        <exclude name="CodeIgniter.Files.ClosingFileComment"/>

        <!-- The one below (CodeIgniter.Strings.DoubleQuoteUsage) is buggued.
        
        Either you uncomment the rule below, or you apply the patch below.
        
        It invites to change
            'SELECT foo FROM bar WHERE baz = \'bag\''
        into
            "SELECT foo FROM bar WHERE baz = 'bag'"
        
        PATCH:
        ======
        -\-\- a/CodeIgniter/Sniffs/Strings/DoubleQuoteUsageSniff.php
        +++ b/CodeIgniter/Sniffs/Strings/DoubleQuoteUsageSniff.php
        @@ -135,7 +135,7 @@ class DoubleQuoteUsageSniff extends VariableUsageSniff
                 $smpl_qt_at = strpos($qtString, "'");
                 if (false === $has_variable && false !== $smpl_qt_at && false === $dbl_qt_at) {
                     $warning = 'You may also use double-quoted strings if the string contains single quotes, so you do not have to use escape characters.';
        -            $phpcsFile->addWarning($warning, $stackPtr);
        +            $phpcsFile->addWarning($warning, $stackPtr, '');
                 }
             }//end processSingleQuotedString()
        -->
        <!--exclude name="CodeIgniter.Strings.DoubleQuoteUsage"/-->
    </rule>

    <!-- Reverts the '{' back to the same line as class definition (PHP CS Fixer can't
    do this and always puts it after the class) -->
    <rule ref="Generic.Classes.OpeningBraceSameLine"/>

    <!-- Use separate files for each class, unless the classes are closely related.
    An example of a CodeIgniter file that contains multiple classes is the Xmlrpc library file. -->
    <rule ref="Generic.Files.OneClassPerFile">
        <type>warning</type>
    </rule>

    <rule ref="CodeIgniter.Operators.StrictComparisonOperator">
        <type>warning</type>
    </rule>

    <rule ref="CodeIgniter.Commenting.InlineComment">
        <properties>
            <property name="longCommentLimit" value="5"/>
        </properties>
    </rule>

</ruleset>