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

CommentFileSizeAuthor
#2 3334699-2.patch5.66 KBsamitk
Command icon 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

samit.310@gmail.com created an issue. See original summary.

samitk’s picture

Assigned: samitk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new5.66 KB

Error/warnings are fixed.

Sonal Gyanani made their first commit to this issue’s fork.

hardikpandya’s picture

Status: Needs review » Reviewed & tested by the community

The patch is applying and I do not see any more phpcs issues.

hardikpandya’s picture

@Sonal Gyanani what is the point of raising MR that duplicates the already provided patch?

matej.lehotsky made their first commit to this issue’s fork.

matej.lehotsky’s picture

@hardikpandya patch is correct, it cover new functionality added for beta3 release.

matej.lehotsky’s picture

Status: Reviewed & tested by the community » Fixed
matej.lehotsky’s picture

Status: Fixed » Closed (fixed)