Problem/Motivation

FILE: /var/www/html/maxlength/maxlength.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
254 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /var/www/html/maxlength/maxlength.install
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
11 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
12 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /var/www/html/maxlength/tests/src/FunctionalJavascript/MaxLengthCustomLinkWidgetTest.php
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
3 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: /var/www/html/maxlength/tests/src/FunctionalJavascript/MaxLengthCustomWidgetTest.php
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 21 WARNINGS AFFECTING 7 LINES
------------------------------------------------------------------------------------------
89 | WARNING | [ ] Line exceeds 80 characters; contains 103 characters
89 | WARNING | [x] There must be no blank line following an inline comment
89 | WARNING | [ ] There must be no blank line following an inline comment
95 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
95 | WARNING | [x] There must be no blank line following an inline comment
95 | WARNING | [ ] There must be no blank line following an inline comment
104 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
104 | WARNING | [x] There must be no blank line following an inline comment
104 | WARNING | [ ] There must be no blank line following an inline comment
113 | WARNING | [ ] Line exceeds 80 characters; contains 103 characters
113 | WARNING | [x] There must be no blank line following an inline comment
113 | WARNING | [ ] There must be no blank line following an inline comment
118 | WARNING | [ ] Line exceeds 80 characters; contains 103 characters
118 | WARNING | [x] There must be no blank line following an inline comment
118 | WARNING | [ ] There must be no blank line following an inline comment
124 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
124 | WARNING | [x] There must be no blank line following an inline comment
124 | WARNING | [ ] There must be no blank line following an inline comment
133 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
133 | WARNING | [x] There must be no blank line following an inline comment
133 | WARNING | [ ] There must be no blank line following an inline comment
------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------

Time: 385ms; Memory: 6MB

Issue fork maxlength-3513897

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

ggh created an issue. See original summary.

ggh’s picture

Assigned: ggh » Unassigned
Status: Active » Needs review

MR Raised

paraderojether’s picture

Hi

I reviewed MR!59 confirmed it passed phcps using Gitlab CI. However there are still phpcs issues found using PHP_CodeSniffer shown below:

➜  maxlength git:(main) ✗ curl https://git.drupalcode.org/project/maxlength/-/merge_requests/59.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5215    0  5215    0     0  17373      0 --:--:-- --:--:-- --:--:-- 17677
patching file maxlength.install
patching file maxlength.module
patching file 'tests/src/FunctionalJavascript/MaxLengthCustomLinkWidgetTest.php'
patching file 'tests/src/FunctionalJavascript/MaxLengthCustomWidgetTest.php'
➜  maxlength git:(main) ✗ cd ..
➜  contrib git:(main) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig maxlength

FILE: /Users/jetherparadero/Q1/q1issues/web/modules/contrib/maxlength/tests/src/FunctionalJavascript/MaxLengthCustomLinkWidgetTest.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\field\Entity\FieldStorageConfig.
--------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/jetherparadero/Q1/q1issues/web/modules/contrib/maxlength/maxlength.module
----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
 11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\WidgetInterface.
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

Time: 304ms; Memory: 12MB

Will retain the status to Needs Review so that others can also check.
Thank you.

idebr made their first commit to this issue’s fork.

paraderojether’s picture

Status: Needs review » Reviewed & tested by the community

Hi

I reviewed MR!59 again, and confirmed PHPCS issue are now passed on Gitlab CI and PHPCodesniffer.

Jether@PrometSources-MacBook-Pro-4 maxlength % curl https://git.drupalcode.org/project/maxlength/-/merge_requests/59.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5689    0  5689    0     0  10993      0 --:--:-- --:--:-- --:--:-- 10982
patching file maxlength.install
patching file maxlength.module
patching file 'tests/src/FunctionalJavascript/MaxLengthCustomLinkWidgetTest.php'
patching file 'tests/src/FunctionalJavascript/MaxLengthCustomWidgetTest.php'
Jether@PrometSources-MacBook-Pro-4 maxlength % cd ..
Jether@PrometSources-MacBook-Pro-4 contrib % phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,twig maxlength
Jether@PrometSources-MacBook-Pro-4 contrib %

Moving this to RTBC!
Thank you!

joevagyok made their first commit to this issue’s fork.

joevagyok’s picture

Status: Reviewed & tested by the community » 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.

  • joevagyok committed b15f1e5b on 3.x authored by ggh
    Issue #3513897: Fix the issues reported by phpcs