I've recently used Coder's Coder Sniffer for another project and thought it would be useful to run it on file_entity. Patch forthcoming for some minor coding standards changes for these files.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bneil’s picture

Status: Active » Needs review
FileSize
8.66 KB

Issues fixed:

--------------------------------------------------------------------------------
FOUND 25 ERROR(S) AND 8 WARNING(S) AFFECTING 29 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | Missing file doc comment
37 | ERROR | Missing parameter type at position 1
41 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
48 | ERROR | Case breaking statements must be followed by a single blank
| | line
48 | ERROR | Case breaking statement indented incorrectly; expected 8
| | spaces, found 6
51 | ERROR | Case breaking statement indented incorrectly; expected 8
| | spaces, found 6
141 | WARNING | Line exceeds 80 characters; contains 82 characters
143 | WARNING | Line exceeds 80 characters; contains 83 characters
149 | ERROR | Case breaking statements must be followed by a single blank
| | line
152 | ERROR | Case breaking statements must be followed by a single blank
| | line
160 | ERROR | Function comment short description must be on a single line
179 | WARNING | A comma should follow the last multiline array item. Found: )
216 | ERROR | Function comment short description must end with a full stop
312 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own line
458 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
479 | ERROR | Missing function doc comment
480 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own line
481 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
502 | ERROR | Missing function doc comment
530 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own line
530 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own line
555 | ERROR | Case breaking statement indented incorrectly; expected 8
| | spaces, found 6
566 | ERROR | Case breaking statement indented incorrectly; expected 8
| | spaces, found 6
576 | ERROR | Case breaking statement indented incorrectly; expected 8
| | spaces, found 6
640 | ERROR | Expected 1 space before "="; 0 found
640 | ERROR | Expected 1 space after "="; 0 found
682 | ERROR | Expected 1 space before "="; 0 found
682 | ERROR | Expected 1 space after "="; 0 found
728 | WARNING | Line exceeds 80 characters; contains 92 characters
--------------------------------------------------------------------------------

FILE: /var/www/drupal-7-pareview/pareview_temp/file_entity.admin.js
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
1 | ERROR | Additional whitespace found at start of file
--------------------------------------------------------------------------------

Issue identified, but not fixed.

I'm not familiar enough to know if these are false positives.

--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 4 WARNING(S) AFFECTING 4 LINE(S)
--------------------------------------------------------------------------------
  951 | WARNING | Empty return statement not required here
  988 | WARNING | Empty return statement not required here
 1013 | WARNING | Empty return statement not required here
 1048 | WARNING | Empty return statement not required here
--------------------------------------------------------------------------------
bneil’s picture

Assigned: bneil » Unassigned
Devin Carlson’s picture

Status: Needs review » Fixed

The changes in #1 look good.

Committed to File entity 7.x-2.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.