-
-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs/WordPress.WhiteSpace.PrecisionAlignment (#1725)
Adds documentation for the WordPress.WhiteSpace.PrecisionAlignmentSniff Related to #1722
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |