Problem/Motivation

Getting following error/warnings.

FILE: /var/www/html/modules/contrib/add_child_page/README.md
-----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------
65 | WARNING | [ ] Line exceeds 80 characters; contains 93 characters
65 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------

Time: 2.62 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/add_child_page/

Proposed resolution

Above error/warning need to be fixed.

CommentFileSizeAuthor
#2 3338459-2.patch416 bytessamitk
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
Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new416 bytes

Above error/warning are fixed.

Sonal Gyanani’s picture

Assigned: Unassigned » Sonal Gyanani

Sonal Gyanani’s picture

Assigned: Sonal Gyanani » Unassigned

Patch #2 applied cleanly, and all errors and warnings are fixed.
Created MR for the same.

RTBC +1
Thanks

a.aaronjake’s picture

Status: Needs review » Needs work
Issue tags: -, -

Hi Sonal Gyanani,

Applied the patch that was also put in MR, it was applied successfully, however, there are still errors that was not addressed by the patch/MR. Please see below:

add_child_page git:(master) ✗ curl https://git.drupalcode.org/project/add_child_page/-/merge_requests/3.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   483    0   483    0     0     98      0 --:--:--  0:00:04 --:--:--   132
patching file README.md
➜  add_child_page git:(master) ✗ cd ..
➜  contrib git:(master) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig add_child_page

FILE: ...rupal-orgissue-v9/web/modules/contrib/add_child_page/add_child_page.module
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\Component\Utility\Html.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...ssue-v9/web/modules/contrib/add_child_page/src/Controller/AddChildPage.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 8 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\Core\Access\AccessResult.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 220ms; Memory: 10MB

Kindly check

Thanks,
Jake

baikho’s picture

Version: 2.0.5 » 3.x-dev

baikho changed the visibility of the branch 3.x to hidden.

baikho changed the visibility of the branch 2.x to hidden.

  • baikho committed 79255f3f on 3.x
    fix: #3338459 Drupal Coding Standards Issues | phpcs
    
    By: baikho
    By:...

  • baikho committed 79255f3f on 3.1.x
    fix: #3338459 Drupal Coding Standards Issues | phpcs
    
    By: baikho
    By:...
baikho’s picture

Status: Needs work » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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