Skip to content

Commit d20d838

Browse files
committed
fix: override changes to the core WordPress config which prevent use of our preferred indentation
1 parent 51f1929 commit d20d838

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

GPA-Lab-WordPress/ruleset.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<arg name="colors"/>
1313
<arg name="extensions" value="php" />
1414
<arg value="s"/>
15+
<arg name="tab-width" value="2"/>
1516

1617
<!-- Identify PHP cross-version compatibility issues in projects based on the WordPress CMS -->
1718
<rule ref="PHPCompatibilityWP" />
@@ -24,9 +25,11 @@
2425
<!-- Exclude unwanted rules from the Wordpress ruleset. -->
2526
<rule ref="WordPress">
2627
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent" />
28+
<exclude name="PEAR.Functions.FunctionCallSignature.Indent"/>
29+
<exclude name="PEAR.Functions.FunctionCallSignature.OpeningIndent"/>
30+
<exclude name="Universal.WhiteSpace.PrecisionAlignment"/>
2731
<exclude name="WordPress.Arrays.ArrayIndentation.ItemNotAligned" />
2832
<exclude name="WordPress.Arrays.ArrayIndentation.MultiLineArrayItemNotAligned" />
29-
<exclude name="WordPress.WhiteSpace.PrecisionAlignment" />
3033
</rule>
3134

3235
<!-- Override indent settings to default to two spaces. -->

GPA-Lab/ruleset.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<arg name="colors"/>
1313
<arg name="extensions" value="php" />
1414
<arg value="s"/>
15+
<arg name="tab-width" value="2"/>
1516

1617
<!-- Default tab width for indentation fixes and such. -->
1718
<arg name="tab-width" value="2"/>
@@ -20,6 +21,8 @@
2021
If you're not evaluating anything in the string, use single quotes. -->
2122
<rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired"/>
2223

24+
<rule ref="Generic.WhiteSpace.DisallowTabIndent">
25+
2326
<!-- Covers rule: Your indentation should always reflect logical structure. -->
2427
<rule ref="Generic.WhiteSpace.ScopeIndent">
2528
<properties>

0 commit comments

Comments
 (0)