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
----------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | coding-standard-8.patch | 23.65 KB | urvashi_vora |
| #7 | Patch-applied.png | 138.19 KB | urvashi_vora |
| #2 | 2763265-2.patch | 43.87 KB | felribeiro |
Issue fork admin_menu-2763265
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
felribeiro commentedFixed all errors, some warning are missing.
Comment #3
truls1502I am sorry for no reply until now.
There are many issues regarding this module admin_menu which is a bit difficult for us to follow up since some of the issues might be already outdated, or is already fixed by the module or any other modules or itself core which means that the problem might no longer need to be fixed.
We can see that the issue has been created for a few years ago, I hope it is okay for you that I am postponing the issue, and give you around two weeks. If you still face the problem, could you tell us the step by step when until you get the error message or what is frustrated you, and a list of modules you are using related to admin_menu and a screenshot that might help us? So it makes us easier to reproduce your issue.
However, after two weeks with no feedback - we will close this issue. So in case, you noticed it after the issue is closed, do not hesitate to reopen it like and fill information which is mentioned above.
So before giving us a feedback, do you mind to test it again with our latest 7.x-3.x-dev?
Thank you for understanding! :)
Comment #4
truls1502Do you mind to take look on coding standards with our latest version?
Comment #5
truls1502Comment #6
urvashi_vora commentedComment #7
urvashi_vora commentedHi @felribeiro,
Your patch failed to apply on the latest 7.x-3.x
Comment #8
urvashi_vora commentedHi,
Please review this patch.
Thanks
Comment #9
dipesh_goswami.