Problem/Motivation
Getting following error/warnings
FILE: /var/www/html/modules/contrib/admin_local_tasks/admin_local_tasks.info.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/admin_local_tasks/admin_local_tasks.module
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 5 WARNINGS AFFECTING 11 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
19 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
38 | 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.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
49 | 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.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
57 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
60 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
79 | WARNING | [x] A comma should follow the last multiline array item. Found: 'delete'
82 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
84 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
96 | WARNING | [x] A comma should follow the last multiline array item. Found: )
118 | ERROR | [x] Doc comment long description must end with a full stop
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/admin_local_tasks/assets/css/base.css
-------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------
77 | ERROR | Style definitions must end with a semicolon
-------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/admin_local_tasks/src/Form/SettingsForm.php
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
42 | WARNING | [ ] Possible useless method overriding detected
71 | WARNING | [x] A comma should follow the last multiline array item. Found: )
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------
Time: 1.72 secs; Memory: 6MB
Steps to reproduce
Run following command
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/admin_local_tasks/
Proposed resolution
Above error/warnings need to be fixed
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3334699-2.patch | 5.66 KB | samitk |
Issue fork admin_local_tasks-3334699
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
samitk commentedError/warnings are fixed.
Comment #5
hardikpandya commentedThe patch is applying and I do not see any more phpcs issues.
Comment #6
hardikpandya commented@Sonal Gyanani what is the point of raising MR that duplicates the already provided patch?
Comment #9
matej.lehotsky commented@hardikpandya patch is correct, it cover new functionality added for beta3 release.
Comment #10
matej.lehotsky commentedComment #11
matej.lehotsky commented