Skip to content

Commit 5954781

Browse files
committed
Use NeutronStandard as opt-in not opt-out
So newly added rules will not break our styles
1 parent 943b6e8 commit 5954781

File tree

3 files changed

+55
-31
lines changed

3 files changed

+55
-31
lines changed

Inpsyde/ruleset.xml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,32 @@
2929
Neutron standard are quality tools for PHP7 development from Automattic.
3030
See https://github.com/Automattic/phpcs-neutron-standard
3131
-->
32-
<rule ref="NeutronStandard">
33-
<exclude name="NeutronStandard.Functions.LongFunction"/>
34-
<exclude name="NeutronStandard.Functions.VariableFunctions"/>
35-
<exclude name="NeutronStandard.Functions.TypeHint"/>
36-
<exclude name="NeutronStandard.Conditions.DisallowConditionAssignWithoutConditional"/>
37-
<exclude name="NeutronStandard.Constants.DisallowDefine"/>
38-
<exclude name="NeutronStandard.MagicMethods.DisallowMagicGet"/>
39-
<exclude name="NeutronStandard.MagicMethods.DisallowMagicSet"/>
40-
<exclude name="NeutronStandard.MagicMethods.RiskyMagicMethod"/>
41-
<rule ref="NeutronStandard.Whitespace.DisallowMultipleNewlines.MultipleNewlines">
42-
<type>warning</type>
43-
</rule>
32+
<rule ref="NeutronStandard.Arrays.DisallowLongformArray">
33+
<type>warning</type>
34+
</rule>
35+
<rule ref="NeutronStandard.AssignAlign.DisallowAssignAlign">
36+
<type>warning</type>
37+
</rule>
38+
<rule ref="NeutronStandard.Extract.DisallowExtract">
39+
<type>warning</type>
40+
</rule>
41+
<rule ref="NeutronStandard.Functions.DisallowCallUserFunc">
42+
<type>warning</type>
43+
</rule>
44+
<rule ref="NeutronStandard.Globals.DisallowGlobalFunctions">
45+
<type>warning</type>
46+
</rule>
47+
<rule ref="NeutronStandard.MagicMethods.DisallowMagicSerialize">
48+
<type>warning</type>
49+
</rule>
50+
<rule ref="NeutronStandard.StrictTypes.RequireStrictTypes">
51+
<type>warning</type>
52+
</rule>
53+
<rule ref="NeutronStandard.Whitespace.DisallowMultipleNewlines">
54+
<type>warning</type>
55+
</rule>
56+
<rule ref="NeutronStandard.Whitespace.RequireNewlineBetweenFunctions">
57+
<type>warning</type>
4458
</rule>
4559

4660
<!--

docs/rules-list/neutron-standard.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,18 @@
33
- NeutronStandard
44
- NeutronStandard.Arrays
55
- NeutronStandard.Arrays.DisallowLongformArray
6-
- NeutronStandard.Arrays.DisallowLongformArray.LongformArray
6+
- NeutronStandard.AssignAlign
7+
- NeutronStandard.AssignAlign.DisallowAssignAlign
78
- NeutronStandard.Extract
89
- NeutronStandard.Extract.DisallowExtract
9-
- NeutronStandard.Extract.DisallowExtract.Extract
1010
- NeutronStandard.Functions
1111
- NeutronStandard.Functions.DisallowCallUserFunc
12-
- NeutronStandard.Functions.DisallowCallUserFunc.CallUserFunc
1312
- NeutronStandard.Globals
1413
- NeutronStandard.Globals.DisallowGlobalFunctions
15-
- NeutronStandard.Globals.DisallowGlobalFunctions.GlobalFunctions
1614
- NeutronStandard.MagicMethods
1715
- NeutronStandard.MagicMethods.DisallowMagicSerialize
18-
- NeutronStandard.MagicMethods.DisallowMagicSerialize.MagicSerialize
1916
- NeutronStandard.StrictTypes
2017
- NeutronStandard.StrictTypes.RequireStrictTypes
21-
- NeutronStandard.StrictTypes.RequireStrictTypes.StrictTypes
2218
- NeutronStandard.Whitespace
2319
- NeutronStandard.Whitespace.DisallowMultipleNewlines
24-
- NeutronStandard.Whitespace.DisallowMultipleNewlines.MultipleNewlines
20+
- NeutronStandard.Whitespace.RequireNewlineBetweenFunctions

phpcs.xml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,32 @@
3333
Neutron standard are quality tools for PHP7 development from Automattic.
3434
See https://github.com/Automattic/phpcs-neutron-standard
3535
-->
36-
<rule ref="NeutronStandard">
37-
<exclude name="NeutronStandard.Functions.LongFunction"/>
38-
<exclude name="NeutronStandard.Functions.VariableFunctions"/>
39-
<exclude name="NeutronStandard.Functions.TypeHint"/>
40-
<exclude name="NeutronStandard.Conditions.DisallowConditionAssignWithoutConditional"/>
41-
<exclude name="NeutronStandard.Constants.DisallowDefine"/>
42-
<exclude name="NeutronStandard.MagicMethods.DisallowMagicGet"/>
43-
<exclude name="NeutronStandard.MagicMethods.DisallowMagicSet"/>
44-
<exclude name="NeutronStandard.MagicMethods.RiskyMagicMethod"/>
45-
<rule ref="NeutronStandard.Whitespace.DisallowMultipleNewlines.MultipleNewlines">
46-
<type>warning</type>
47-
</rule>
36+
<rule ref="NeutronStandard.Arrays.DisallowLongformArray">
37+
<type>warning</type>
38+
</rule>
39+
<rule ref="NeutronStandard.AssignAlign.DisallowAssignAlign">
40+
<type>warning</type>
41+
</rule>
42+
<rule ref="NeutronStandard.Extract.DisallowExtract">
43+
<type>warning</type>
44+
</rule>
45+
<rule ref="NeutronStandard.Functions.DisallowCallUserFunc">
46+
<type>warning</type>
47+
</rule>
48+
<rule ref="NeutronStandard.Globals.DisallowGlobalFunctions">
49+
<type>warning</type>
50+
</rule>
51+
<rule ref="NeutronStandard.MagicMethods.DisallowMagicSerialize">
52+
<type>warning</type>
53+
</rule>
54+
<rule ref="NeutronStandard.StrictTypes.RequireStrictTypes">
55+
<type>warning</type>
56+
</rule>
57+
<rule ref="NeutronStandard.Whitespace.DisallowMultipleNewlines">
58+
<type>warning</type>
59+
</rule>
60+
<rule ref="NeutronStandard.Whitespace.RequireNewlineBetweenFunctions">
61+
<type>warning</type>
4862
</rule>
4963

5064
<!--

0 commit comments

Comments
 (0)