Coding Standard Issues

Created on 1 November 2024, 6 months ago

Problem/Motivation

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css .

FILE: .../web/modules/custom/l10n_tools/README.md
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------
4 | WARNING | Line exceeds 80 characters; contains 235 characters
8 | WARNING | Line exceeds 80 characters; contains 85 characters
20 | WARNING | Line exceeds 80 characters; contains 130 characters
35 | WARNING | Line exceeds 80 characters; contains 129 characters
--------------------------------------------------------------------------

FILE: .../web/modules/custom/l10n_tools/src/Commands/L10nToolsCommands.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\l10n_tools\QueryHelper.
31 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
35 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/l10n_tools/src/Form/L10nToolsForm.php
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
11 | 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
------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css .

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

šŸ‡µšŸ‡ŖPeru alyaj2a

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @alyaj2a
  • Merge request !10Coding Standard issues - #3485150 → (Open) created by alyaj2a
  • Pipeline finished with Success
    6 months ago
    Total: 157s
    #327260
  • šŸ‡µšŸ‡­Philippines clarkssquared

    Hi @alyaj2a,

    I applied your MR !10 and there's 1 remaining PHPCS issue that is fixable with PHPCBF, please check

    āžœ  l10n_tools git:(1.0.x) curl https://git.drupalcode.org/project/l10n_tools/-/merge_requests/10.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  3668    0  3668    0     0   7355      0 --:--:-- --:--:-- --:--:--  7501
    patching file README.md
    patching file 'src/Commands/L10nToolsCommands.php'
    patching file 'src/Form/L10nToolsForm.php'
    āžœ  l10n_tools git:(1.0.x) āœ— ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml l10n_tools       
    
    FILE: ...l/drupal/web/modules/contrib/l10n_tools/src/Commands/L10nToolsCommands.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     36 | ERROR | [x] Multi-line function declarations must have a trailing comma
        |       |     after the last parameter
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    Time: 352ms; Memory: 12MB
    
    āžœ  contrib git:(main) āœ— 
  • šŸ‡©šŸ‡ŖGermany Anybody Porta Westfalica
Production build 0.71.5 2024