Problem/Motivation
Fix phpcs errors for
Command:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,twig modules/custom/pathauto/ --sniffs="Drupal.Files.LineLength"
Result:
FILE: tests/src/Functional/PathautoNodeWebTest.php
----------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------
208 | WARNING | Line exceeds 80 characters; contains 92 characters
| | (Drupal.Files.LineLength.TooLong)
225 | WARNING | Line exceeds 80 characters; contains 81 characters
| | (Drupal.Files.LineLength.TooLong)
----------------------------------------------
FILE: tests/src/Kernel/PathautoTokenTest.php
---------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------
38 | WARNING | Line exceeds 80 characters; contains 81 characters
| | (Drupal.Files.LineLength.TooLong)
---------------------------------------------
FILE: tests/src/FunctionalJavascript/PathautoUiTest.php
----------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------
107 | WARNING | Line exceeds 80 characters; contains 97 characters
| | (Drupal.Files.LineLength.TooLong)
----------------------------------------------
FILE: pathauto.module
---------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------
16 | WARNING | Line exceeds 80 characters; contains 88 characters
| | (Drupal.Files.LineLength.TooLong)
---------------------------------------------
FILE: src/AliasUniquifier.php
----------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------
105 | WARNING | Line exceeds 80 characters; contains 81 characters
| | (Drupal.Files.LineLength.TooLong)
----------------------------------------------
FILE: src/PathautoWidget.php
----------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------
35 | WARNING | Line exceeds 80 characters; contains 149 characters
| | (Drupal.Files.LineLength.TooLong)
----------------------------------------------
FILE: src/AliasCleanerInterface.php
---------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------
16 | WARNING | Line exceeds 80 characters; contains 81 characters
| | (Drupal.Files.LineLength.TooLong)
55 | WARNING | Line exceeds 80 characters; contains 81 characters
| | (Drupal.Files.LineLength.TooLong)
---------------------------------------------
FILE: src/AliasUniquifierInterface.php
---------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------
13 | WARNING | Line exceeds 80 characters; contains 81 characters
| | (Drupal.Files.LineLength.TooLong)
---------------------------------------------
Time: 1.13 secs; Memory: 8MB
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #3
nikolay shapovalov commentedMR is ready for review.
Used fix for
src/PathautoWidget.phpsame as in #3411792: Fix phpcs Drupal.WhiteSpace, Squiz.WhiteSpace issues.Comment #4
sidharth_soman commentedProbably should have
rather than
in tests/src/Kernel/PathautoTokenTest.php. It looks better grammatically.
Comment #5
nikolay shapovalov commentedUpdate MR, add phpcs.xml file and exclude rules that will be fixed in different issues.
Gitlab CI check phpcs passed.
Comment #6
nikolay shapovalov commentedRemoved changes from PathautoWidget.php because there is separate task #3418158: Remove leftover from src/PathautoWidget.php.
Comment #7
a.aaronjake commentedHi @Nikolay Shapovalov,
Your latest changes on MR66 was applied successfully, however one error still not fixed. Please see below:
Kindly check
Thanks,
Jake
Comment #9
santanu mondal commentedComment #10
santanu mondal commentedComment #11
roberttabigue commentedHi,
I have applied the latest MR!66 to the Pathauto module with 8.x-1.x-dev and confirmed all PHPCS errors have been fixed.
I ran this command on the module:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,twig pathauto/ --sniffs="Drupal.Files.LineLength"Please see the attached files for reference.
I'm moving this now to ‘RTBC’.
Thank you!
Comment #12
berdirReviewed.
This includes a lot more than just line length issues.
Comment #13
jerech commentedComment #14
roberttabigue commentedHi,
I have applied the latest MR!66 to the Pathauto module (8.x-1.x-dev) on my local Drupal setup, confirmed all PHPCS errors have been fixed.
I ran this command on the module:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,twig pathauto/ --sniffs="Drupal.Files.LineLength"Please see the attached file for reference.
I'm moving this now to "RTBC".
Thank you!
Comment #15
mably commentedComment #17
mably commented