When running the module code against Drupal coding standards based on Drupal standard, the module shows errors

phpcs  --standard=Drupal

FILE: admin_menu.js
----------------------------------------------------------------------
FOUND 39 ERRORS AFFECTING 39 LINES
----------------------------------------------------------------------
   1 | ERROR | [x] Missing file doc comment
   3 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
   4 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
   5 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
   7 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
  13 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
  37 | ERROR | [x] Line indented incorrectly; expected 8 spaces,
     |       |     found 10
  53 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 0
  55 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
  58 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
  64 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 0
  66 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
  69 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
  95 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 0
  97 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 104 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 110 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 0
 112 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 120 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 127 | ERROR | [x] Comments may not appear after statements
 128 | ERROR | [x] Comments may not appear after statements
 137 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 142 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 153 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 158 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 161 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 170 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 173 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 180 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 183 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 195 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 198 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 204 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 207 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 215 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 221 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 243 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 246 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
 381 | ERROR | [x] Line indented incorrectly; expected at least 2
     |       |     spaces, found 0
----------------------------------------------------------------------
PHPCBF CAN FIX THE 39 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: admin_menu.map.inc
----------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------
  12 | WARNING | Format should be "* Implements hook_foo().", "*
     |         | Implements hook_foo_BAR_ID_bar() for xyz_bar().",,
     |         | "* Implements hook_foo_BAR_ID_bar() for
     |         | xyz-bar.html.twig.", or "* Implements
     |         | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
  28 | WARNING | Format should be "* Implements hook_foo().", "*
     |         | Implements hook_foo_BAR_ID_bar() for xyz_bar().",,
     |         | "* Implements hook_foo_BAR_ID_bar() for
     |         | xyz-bar.html.twig.", or "* Implements
     |         | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
  44 | WARNING | Format should be "* Implements hook_foo().", "*
     |         | Implements hook_foo_BAR_ID_bar() for xyz_bar().",,
     |         | "* Implements hook_foo_BAR_ID_bar() for
     |         | xyz-bar.html.twig.", or "* Implements
     |         | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
  60 | WARNING | Format should be "* Implements hook_foo().", "*
     |         | Implements hook_foo_BAR_ID_bar() for xyz_bar().",,
     |         | "* Implements hook_foo_BAR_ID_bar() for
     |         | xyz-bar.html.twig.", or "* Implements
     |         | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
 116 | WARNING | Format should be "* Implements hook_foo().", "*
     |         | Implements hook_foo_BAR_ID_bar() for xyz_bar().",,
     |         | "* Implements hook_foo_BAR_ID_bar() for
     |         | xyz-bar.html.twig.", or "* Implements
     |         | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
 132 | WARNING | Format should be "* Implements hook_foo().", "*
     |         | Implements hook_foo_BAR_ID_bar() for xyz_bar().",,
     |         | "* Implements hook_foo_BAR_ID_bar() for
     |         | xyz-bar.html.twig.", or "* Implements
     |         | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
----------------------------------------------------------------------


FILE: admin_menu_toolbar/admin_menu_toolbar.css
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
   1 | ERROR | [x] Additional whitespace found at start of file
 144 | ERROR | [x] Expected 1 newline at end of file; 2 found
 145 | ERROR | [x] Additional whitespace found at end of file
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: admin_menu_toolbar/admin_menu_toolbar.js
----------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 9 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
  3 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
  4 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
  6 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
 11 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
 16 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
 22 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
 25 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
 52 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
----------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: admin_menu.inc
----------------------------------------------------------------------
FOUND 20 ERRORS AND 5 WARNINGS AFFECTING 24 LINES
----------------------------------------------------------------------
   9 | WARNING | [ ] Line exceeds 80 characters; contains 82
     |         |     characters
  11 | ERROR   | [ ] Missing parameter type
  53 | ERROR   | [ ] Missing parameter type
  57 | ERROR   | [ ] Return type missing for @return tag in function
     |         |     comment
 100 | ERROR   | [x] Inline comments must start with a capital letter
 137 | ERROR   | [ ] Missing parameter type
 139 | ERROR   | [ ] Missing parameter type
 141 | ERROR   | [ ] Missing parameter type
 252 | ERROR   | [ ] Missing parameter type
 254 | ERROR   | [ ] Missing parameter type
 272 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, question marks, or
     |         |     closing parentheses
 281 | ERROR   | [x] The first index in a multi-value array must be
     |         |     on a new line
 284 | ERROR   | [x] Closing parenthesis of array declaration must be
     |         |     on a new line
 293 | ERROR   | [ ] Missing parameter type
 350 | ERROR   | [ ] Missing parameter type
 354 | ERROR   | [ ] Return type missing for @return tag in function
     |         |     comment
 693 | WARNING | [ ] Line exceeds 80 characters; contains 86
     |         |     characters
 693 | ERROR   | [ ] Doc comment short description must start with a
     |         |     capital letter
 719 | WARNING | [ ] Format should be "* Implements hook_foo().", "*
     |         |     Implements hook_foo_BAR_ID_bar() for
     |         |     xyz_bar().",, "* Implements
     |         |     hook_foo_BAR_ID_bar() for xyz-bar.html.twig.",
     |         |     or "* Implements hook_foo_BAR_ID_bar() for
     |         |     xyz-bar.tpl.php.".
 735 | ERROR   | [ ] If the line declaring an array spans longer than
     |         |     80 characters, each element should be broken
     |         |     into its own line
 754 | ERROR   | [ ] Missing parameter type
 797 | WARNING | [ ] Format should be "* Implements hook_foo().", "*
     |         |     Implements hook_foo_BAR_ID_bar() for
     |         |     xyz_bar().",, "* Implements
     |         |     hook_foo_BAR_ID_bar() for xyz-bar.html.twig.",
     |         |     or "* Implements hook_foo_BAR_ID_bar() for
     |         |     xyz-bar.tpl.php.".
 817 | WARNING | [ ] Format should be "* Implements hook_foo().", "*
     |         |     Implements hook_foo_BAR_ID_bar() for
     |         |     xyz_bar().",, "* Implements
     |         |     hook_foo_BAR_ID_bar() for xyz-bar.html.twig.",
     |         |     or "* Implements hook_foo_BAR_ID_bar() for
     |         |     xyz-bar.tpl.php.".
 830 | ERROR   | [ ] Missing parameter type
 909 | ERROR   | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: admin_menu.uid1.css
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | ERROR | [x] Additional whitespace found at start of file
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: admin_menu.admin.js
----------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
  3 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
  6 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
 15 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     0
 17 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
 25 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
 60 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     0
----------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: admin_devel/admin_devel.js
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
  3 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
  4 | ERROR | [x] Doc comment short description must start with a
    |       |     capital letter
 12 | ERROR | [x] Line indented incorrectly; expected at least 2
    |       |     spaces, found 0
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: admin_menu.color.css
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] Additional whitespace found at start of file
 20 | ERROR | [x] CSS colours must be defined in lowercase; expected
    |       |     #52565e but found #52565E
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: admin_menu-rtl.css
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] Additional whitespace found at start of file
 28 | ERROR | [x] CSS colours must be defined in lowercase; expected
    |       |     #52565e but found #52565E
 39 | ERROR | [ ] Class definition is empty
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: admin_menu.css
----------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------
   1 | ERROR | [x] Additional whitespace found at start of file
  65 | ERROR | [x] CSS colours must be defined in lowercase; expected
     |       |     #eee but found #EEE
  77 | ERROR | [x] CSS colours must be defined in lowercase; expected
     |       |     #52565e but found #52565E
 150 | ERROR | [x] CSS colours must be defined in lowercase; expected
     |       |     #45454a but found #45454A
 158 | ERROR | [x] CSS colours must be defined in lowercase; expected
     |       |     #fff but found #FFF
 163 | ERROR | [x] CSS colours must be defined in lowercase; expected
     |       |     #eee but found #EEE
 170 | ERROR | [x] CSS colours must be defined in lowercase; expected
     |       |     #eee but found #EEE
----------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: admin_menu.api.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
 55 | WARNING | Line exceeds 80 characters; contains 81 characters
 57 | WARNING | Line exceeds 80 characters; contains 81 characters
----------------------------------------------------------------------
Files: 
CommentFileSizeAuthor
#2 2763265-2.patch43.87 KBfelribeiro

Comments

felribeiro created an issue. See original summary.

felribeiro’s picture

Status: Active » Needs review
FileSize
43.87 KB

Fixed all errors, some warning are missing.