Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

White space normalizing #15

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

No description provided.

Most of the patch is for the comments spacing. Sometimes the comment blocks have a preceding space to get the asterisks to line up. This normalizes on that.

tha_body_top and tha_body_bottom where indented by a space (from returning after the indented comment) also fixed.

@GaryJones GaryJones referenced this pull request in WordPress-Coding-Standards/WordPress-Coding-Standards Aug 28, 2014

Closed

Array trailing comma on comment lines #230

Running @WraithKenny's version against the latest WordPress-Coding-Standards for the WordPress superset standard gives a few more fixable bits:

FILE: .../tha-theme-hooks.php
--------------------------------------------------------------------------------
FOUND 23 ERRORS AND 1 WARNING AFFECTING 22 LINES
--------------------------------------------------------------------------------
  14 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
  26 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
  29 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
  34 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
  40 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
  48 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
  53 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
  67 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
  73 | ERROR   | [ ] Comma required after last value in array declaration
     |         |     (WordPress.Arrays.ArrayDeclaration)
  78 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
  81 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
  85 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
  87 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
  91 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
 118 | WARNING | [ ] Line is indented with space not tab
     |         |     (WordPress.WhiteSpace.PhpIndent.Incorrect)
 118 | ERROR   | [ ] Tabs must be used to indent lines; spaces are not allowed
     |         |     (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
 118 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
 121 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
 134 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
 155 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
 176 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
 197 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
 210 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
 231 | ERROR   | [x] Whitespace found at end of line
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 21 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

The line 73 entry seems to be a false positive (bug) in WPCS. I've reported it at WordPress-Coding-Standards/WordPress-Coding-Standards#230.

@robneu robneu referenced this pull request Sep 13, 2014

Merged

WPCS Cleanup #30

@zamoose zamoose closed this in #30 Mar 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment