Skip to content

Commit d00b44b

Browse files
ckanitzjrfnl
authored andcommitted
Docs/WordPress.WhiteSpace.PrecisionAlignment (#1725)
Adds documentation for the WordPress.WhiteSpace.PrecisionAlignmentSniff Related to #1722
1 parent bf3ef48 commit d00b44b

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<documentation title="Precision Alignment">
2+
<standard>
3+
<![CDATA[
4+
Line indentation should only use tabs. Precision alignment with spaces after the tabs is strongly discouraged.
5+
]]>
6+
</standard>
7+
<code_comparison>
8+
<code title="Valid: only tabstops used for indentation.">
9+
<![CDATA[
10+
<em>[tab]</em>$var = true;
11+
]]>
12+
</code>
13+
<code title="Invalid: precision alignment of 2 spaces.">
14+
<![CDATA[
15+
<em>[space][space]</em>$var = true;
16+
]]>
17+
</code>
18+
</code_comparison>
19+
<code_comparison>
20+
<code title="Valid: four spaces counts as a tab, the replacement of these will be handled by another sniff.">
21+
<![CDATA[
22+
<em>[tab][space][space][space][space]</em>$var = true;
23+
]]>
24+
</code>
25+
<code title="Invalid: precision alignment of 3 spaces.">
26+
<![CDATA[
27+
<em>[tab][space][space][space]</em>$var = true;
28+
]]>
29+
</code>
30+
</code_comparison>
31+
</documentation>

0 commit comments

Comments
 (0)