Skip to content

Commit

Permalink
Docs/WordPress.WhiteSpace.PrecisionAlignment (#1725)
Browse files Browse the repository at this point in the history
Adds documentation for the WordPress.WhiteSpace.PrecisionAlignmentSniff

Related to #1722
  • Loading branch information
ckanitz authored and jrfnl committed Jul 5, 2019
1 parent bf3ef48 commit d00b44b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions WordPress/Docs/WhiteSpace/PrecisionAlignmentStandard.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<documentation title="Precision Alignment">
<standard>
<![CDATA[
Line indentation should only use tabs. Precision alignment with spaces after the tabs is strongly discouraged.
]]>
</standard>
<code_comparison>
<code title="Valid: only tabstops used for indentation.">
<![CDATA[
<em>[tab]</em>$var = true;
]]>
</code>
<code title="Invalid: precision alignment of 2 spaces.">
<![CDATA[
<em>[space][space]</em>$var = true;
]]>
</code>
</code_comparison>
<code_comparison>
<code title="Valid: four spaces counts as a tab, the replacement of these will be handled by another sniff.">
<![CDATA[
<em>[tab][space][space][space][space]</em>$var = true;
]]>
</code>
<code title="Invalid: precision alignment of 3 spaces.">
<![CDATA[
<em>[tab][space][space][space]</em>$var = true;
]]>
</code>
</code_comparison>
</documentation>

0 comments on commit d00b44b

Please sign in to comment.