|
15 | 15 | <arg name="basepath" value="."/>
|
16 | 16 | <arg name="colors"/>
|
17 | 17 | <arg name="parallel" value="75"/>
|
18 |
| - <arg value="np"/> |
19 |
| - |
20 |
| - <!-- Don't hide tokenizer exceptions --> |
21 |
| - <rule ref="Internal.Tokenizer.Exception"> |
22 |
| - <type>error</type> |
23 |
| - </rule> |
| 18 | + <arg value="p"/> |
24 | 19 |
|
25 | 20 | <!-- Include the whole PEAR standard -->
|
26 | 21 | <rule ref="PEAR">
|
|
32 | 27 | <exclude name="PEAR.Commenting.FileComment.MissingLinkTag"/>
|
33 | 28 | <exclude name="PEAR.Commenting.FileComment.MissingVersion"/>
|
34 | 29 | <exclude name="PEAR.Commenting.InlineComment"/>
|
| 30 | + <exclude name="Generic.Files.LineLength"/> |
35 | 31 | </rule>
|
36 | 32 |
|
37 | 33 | <!-- Include some sniffs from other standards that don't conflict with PEAR -->
|
|
76 | 72 | <rule ref="PSR12.Files.OpenTag"/>
|
77 | 73 | <rule ref="Zend.Files.ClosingTag"/>
|
78 | 74 |
|
79 |
| - <!-- PEAR uses warnings for inline control structures, so switch back to errors --> |
80 |
| - <rule ref="Generic.ControlStructures.InlineControlStructure"> |
81 |
| - <properties> |
82 |
| - <property name="error" value="true"/> |
83 |
| - </properties> |
84 |
| - </rule> |
85 |
| - |
86 | 75 | <!-- We use custom indent rules for arrays -->
|
87 | 76 | <rule ref="Generic.Arrays.ArrayIndent"/>
|
88 | 77 | <rule ref="Squiz.Arrays.ArrayDeclaration.KeyNotAligned">
|
|
111 | 100 | </properties>
|
112 | 101 | </rule>
|
113 | 102 |
|
114 |
| - <!-- Have 12 chars padding maximum and always show as errors --> |
| 103 | + <!-- Have 12 chars padding maximum --> |
115 | 104 | <rule ref="Generic.Formatting.MultipleStatementAlignment">
|
116 | 105 | <properties>
|
117 | 106 | <property name="maxPadding" value="12"/>
|
118 |
| - <property name="error" value="true"/> |
119 | 107 | </properties>
|
120 | 108 | </rule>
|
121 | 109 |
|
|
132 | 120 | </properties>
|
133 | 121 | </rule>
|
134 | 122 |
|
135 |
| - <!-- Private methods MUST not be prefixed with an underscore --> |
136 |
| - <rule ref="PSR2.Methods.MethodDeclaration.Underscore"> |
137 |
| - <type>error</type> |
138 |
| - </rule> |
139 |
| - |
140 |
| - <!-- Private properties MUST not be prefixed with an underscore --> |
141 |
| - <rule ref="PSR2.Classes.PropertyDeclaration.Underscore"> |
142 |
| - <type>error</type> |
143 |
| - </rule> |
144 |
| - |
145 | 123 | <!-- Do not allow unreachable code. -->
|
146 |
| - <rule ref="Squiz.PHP.NonExecutableCode"> |
147 |
| - <type>error</type> |
148 |
| - </rule> |
| 124 | + <rule ref="Squiz.PHP.NonExecutableCode"/> |
149 | 125 |
|
150 | 126 | <!-- The testing bootstrap file uses string concats to stop IDEs seeing the class aliases -->
|
151 | 127 | <rule ref="Generic.Strings.UnnecessaryStringConcat">
|
|
157 | 133 | <exclude-pattern>tests/Core/Tokenizer/StableCommentWhitespaceWinTest\.php</exclude-pattern>
|
158 | 134 | </rule>
|
159 | 135 |
|
| 136 | + <!-- Avoid false positive with this sniff detecting itself --> |
| 137 | + <rule ref="Generic.Commenting.Todo"> |
| 138 | + <exclude-pattern>src/Standards/Generic/Sniffs/Commenting/TodoSniff\.php</exclude-pattern> |
| 139 | + <exclude-pattern>src/Standards/Generic/Tests/Commenting/TodoUnitTest\.php</exclude-pattern> |
| 140 | + </rule> |
| 141 | + |
| 142 | + <!-- @see https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/122#discussion_r1414167897 --> |
| 143 | + <rule ref="Squiz.Commenting.VariableComment"> |
| 144 | + <exclude-pattern>src/Util/Tokens\.php</exclude-pattern> |
| 145 | + </rule> |
160 | 146 | </ruleset>
|
0 commit comments