Skip to content

Commit baabad6

Browse files
author
Vincent Langlet
committed
🔧 Clean ruleset.xml
1 parent 85e15d3 commit baabad6

File tree

1 file changed

+78
-103
lines changed

1 file changed

+78
-103
lines changed

Symfony3Custom/ruleset.xml

Lines changed: 78 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,86 @@
11
<?xml version="1.0"?>
22
<ruleset name="Symfony3Custom">
3+
<!-- See http://symfony.com/doc/current/contributing/code/standards.html -->
34
<description>The Symfony3Custom coding standard.</description>
45

56
<!-- There should not be any code in the bundle Resources directory. -->
67
<exclude-pattern>*/Resources/*</exclude-pattern>
78

8-
<!-- Symfony follows the standards defined in the PSR-0, PSR-1 and PSR-2 documents. -->
9-
10-
<!-- Include the whole PSR-1 standard -->
11-
<rule ref="PSR1"/>
12-
<!-- Include the whole PSR-2 standard -->
13-
<rule ref="PSR2"/>
14-
15-
<!--
16-
See the [documented coding standard](http://symfony.com/doc/current/contributing/code/standards.html)
17-
18-
This CodeSniffer standard does not yet enforce the following:
19-
20-
# Structure
21-
22-
* The @package and @subpackage annotations are not used.
23-
* Use uppercase strings for constants with words separated with underscores
24-
* Exception message strings should be concatenated using sprintf
25-
26-
# Naming Conventions
27-
28-
* Use underscores for option, argument, parameter names;
29-
-->
30-
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
31-
<rule ref="Generic.Formatting.SpaceAfterCast"/>
32-
<rule ref="Generic.Functions.CallTimePassByReference"/>
33-
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
34-
<rule ref="Generic.PHP.LowerCaseConstant"/>
35-
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
36-
<rule ref="Squiz.ControlStructures.ControlSignature"/>
37-
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration"/>
38-
<rule ref="Squiz.ControlStructures.ForLoopDeclaration"/>
39-
<rule ref="Squiz.ControlStructures.LowercaseDeclaration"/>
40-
<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
41-
<rule ref="Squiz.Scope.MemberVarScope"/>
42-
43-
<!-- We provide our own subclass of PEAR's ClassComment and FunctionComment sniff, but these will do: -->
44-
<rule ref="PEAR.Commenting.InlineComment"/>
45-
46-
<!-- Import Zend coding standard (which in turn imports PEAR) -->
47-
<rule ref="Zend">
48-
<!-- but exclude their code analyzer -->
49-
<exclude name="Zend.Debug.CodeAnalyzer"/>
50-
51-
<!-- covered by Squiz ControlSignature, which enforces try/catch as well -->
52-
<exclude name="PEAR.ControlStructures.ControlSignature"/>
53-
54-
<exclude name="PEAR.Commenting.FunctionComment.SpacingBeforeTags"/>
55-
56-
<!-- covered by Squiz FunctionDeclarationSniff -->
57-
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine"/>
58-
</rule>
59-
60-
<!-- Don't enforce Zend's private member underscores -->
61-
<rule ref="Zend.NamingConventions.ValidVariableName.PrivateNoUnderscore">
62-
<severity>0</severity>
63-
</rule>
64-
65-
<!-- Ignore variables that contains numbers -->
66-
<rule ref="Zend.NamingConventions.ValidVariableName.ContainsNumbers">
67-
<severity>0</severity>
68-
</rule>
69-
70-
<!-- In practice, Symfony spaces multiline function calls differently than Zend -->
71-
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
72-
<severity>0</severity>
73-
</rule>
74-
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket">
75-
<severity>0</severity>
76-
</rule>
77-
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
78-
<severity>0</severity>
79-
</rule>
80-
81-
<!-- Params comments are not required -->
82-
<rule ref="Symfony3Custom.Commenting.FunctionComment.MissingParamComment">
83-
<severity>0</severity>
84-
</rule>
85-
86-
<rule ref="Symfony3Custom.Commenting.FunctionComment.SpacingBeforeTags">
87-
<severity>0</severity>
88-
</rule>
89-
90-
<!-- Some customizing -->
91-
<rule ref="Squiz.Strings.ConcatenationSpacing">
92-
<properties>
93-
<property name="spacing" value="1"/>
94-
<property name="ignoreNewlines" value="true" />
95-
</properties>
96-
</rule>
97-
98-
<rule ref="Generic.Files.LineLength">
99-
<properties>
100-
<property name="lineLimit" value="120"/>
101-
</properties>
102-
</rule>
103-
104-
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
105-
<properties>
106-
<property name="ignoreBlankLines" value="false"/>
107-
</properties>
108-
</rule>
109-
110-
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
9+
<!-- ************** -->
10+
<!-- *** PSR2 *** -->
11+
<!-- ************** -->
12+
13+
<!-- Include the whole PSR-2 (so PSR-1) standard -->
14+
<rule ref="PSR2"/>
15+
16+
<!-- ************** -->
17+
<!-- *** ZEND *** -->
18+
<!-- ************** -->
19+
20+
<!-- Import Zend coding standard (which in turn imports PEAR) -->
21+
<rule ref="Zend">
22+
<!-- Exclude their code analyzer -->
23+
<exclude name="Zend.Debug.CodeAnalyzer"/>
24+
25+
<!-- Covered by Squiz ControlSignature -->
26+
<exclude name="PEAR.ControlStructures.ControlSignature"/>
27+
28+
<!-- Covered by PSR2 FunctionCallSignature -->
29+
<exclude name="PEAR.Functions.FunctionCallSignature"/>
30+
31+
<!-- Covered by Squiz FunctionDeclaration imported by PSR2 -->
32+
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine"/>
33+
</rule>
34+
35+
<!-- Don't enforce Zend's private member underscores -->
36+
<rule ref="Zend.NamingConventions.ValidVariableName.PrivateNoUnderscore">
37+
<severity>0</severity>
38+
</rule>
39+
40+
<!-- Ignore variables that contains numbers -->
41+
<rule ref="Zend.NamingConventions.ValidVariableName.ContainsNumbers">
42+
<severity>0</severity>
43+
</rule>
44+
45+
<!-- ****************** -->
46+
<!-- *** OVERRIDE *** -->
47+
<!-- ****************** -->
48+
49+
<!-- Override LineLength to avoid 80 character warning -->
50+
<rule ref="Generic.Files.LineLength">
51+
<properties>
52+
<property name="lineLimit" value="120"/>
53+
</properties>
54+
</rule>
55+
56+
<!-- Override SuperfluousWhitespace to not ignore blank lines -->
57+
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
58+
<properties>
59+
<property name="ignoreBlankLines" value="false"/>
60+
</properties>
61+
</rule>
62+
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
63+
64+
<!-- **************** -->
65+
<!-- *** OTHERS *** -->
66+
<!-- **************** -->
67+
68+
<!-- Rules added by djoos/Symfony2-coding-standard-->
69+
<rule ref="Generic.Formatting.SpaceAfterCast"/>
70+
<rule ref="Generic.Functions.CallTimePassByReference"/>
71+
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
72+
<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
73+
<rule ref="Squiz.Scope.MemberVarScope"/>
74+
<rule ref="PEAR.Commenting.InlineComment"/>
75+
76+
<!-- Rules added by endouble/Symfony3Custom-coding-standard -->
77+
<rule ref="Squiz.Strings.ConcatenationSpacing">
78+
<properties>
79+
<property name="spacing" value="1"/>
80+
<property name="ignoreNewlines" value="true" />
81+
</properties>
82+
</rule>
83+
<rule ref="Symfony3Custom.Commenting.FunctionComment.MissingParamComment">
84+
<severity>0</severity>
85+
</rule>
11186
</ruleset>

0 commit comments

Comments
 (0)