Fix the issues reported by phpcs

Created on 28 June 2023, over 1 year ago
Updated 12 February 2024, 10 months ago

Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml shows the following errors/warnings that should be fixed.

FILE: ./README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
 23 | WARNING | Line exceeds 80 characters; contains 165 characters
 31 | WARNING | Line exceeds 80 characters; contains 169 characters
 35 | WARNING | Line exceeds 80 characters; contains 160 characters
 38 | WARNING | Line exceeds 80 characters; contains 92 characters
----------------------------------------------------------------------


FILE: ./octavia.libraries.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 6 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./octavia.skins.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 28 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./octavia.theme
----------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------
   6 | ERROR   | [x] There must be exactly one blank line after the
     |         |     file comment
 150 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, question marks, colons, or
     |         |     closing parentheses
 163 | WARNING | [x] A comma should follow the last multiline array
     |         |     item. Found: 'moreLink'
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./src/components/style-guide.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
 14 | WARNING | Line exceeds 80 characters; contains 165 characters
 22 | WARNING | Line exceeds 80 characters; contains 169 characters
 37 | WARNING | Line exceeds 80 characters; contains 149 characters
 42 | WARNING | Line exceeds 80 characters; contains 89 characters
----------------------------------------------------------------------
📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇮🇳India sonam_sharma

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @sonam_sharma
  • Issue was unassigned.
  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The issue summary should always describe what the issue is trying to fix and, in the case of coding standards issues, show which command and arguments have been used and which report that command shown. In this way, project maintainers can verify the patch/MR fixes all the warnings/errors.

  • 🇮🇳India imustakim Ahmedabad

    Issue summary updated.

  • 🇮🇳India zkhan.aamir

    Hi,

    patch #2 successfully applied

    Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib/octavia (8.x-1.x)
    $ curl https://www.drupal.org/files/issues/2023-06-28/3370968.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2076  100  2076    0     0   3259      0 --:--:-- --:--:-- --:--:--  3269
    patching file octavia.libraries.yml
    patching file octavia.skins.yml
    patching file octavia.theme
    patching file src/OctaviaPreRender.php
    

    Still some warning remianing

    Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib
    $ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,js,yml octavia
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\octavia\dist\style-guide\kss-assets\rainbow.min.js
    -------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------
     1 | WARNING | File appears to be minified and cannot be processed
    -------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\octavia\README.md
    ----------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    ----------------------------------------------------------------------------------
     23 | WARNING | Line exceeds 80 characters; contains 165 characters
     31 | WARNING | Line exceeds 80 characters; contains 169 characters
     35 | WARNING | Line exceeds 80 characters; contains 160 characters
     38 | WARNING | Line exceeds 80 characters; contains 92 characters
    ----------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\octavia\src\components\style-guide.md
    ------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    ------------------------------------------------------------------------------------------------------
     14 | WARNING | Line exceeds 80 characters; contains 165 characters
     22 | WARNING | Line exceeds 80 characters; contains 169 characters
     37 | WARNING | Line exceeds 80 characters; contains 149 characters
     42 | WARNING | Line exceeds 80 characters; contains 89 characters
    ------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\octavia\src\style-guide\builder\kss-assets\rainbow.min.js
    --------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------
     1 | WARNING | File appears to be minified and cannot be processed
    --------------------------------------------------------------------------------------------------------------------------
    
    Time: 341ms; Memory: 10MB
    
  • First commit to issue fork.
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Needs review 10 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇳India zkhan.aamir

    Hi,

    MR #10 applied successfully.

    Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib/octavia (8.x-1.x)
    $ curl https://git.drupalcode.org/project/octavia/-/merge_requests/2.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  7010    0  7010    0     0  18062      0 --:--:-- --:--:-- --:--:-- 18207
    patching file README.md
    patching file octavia.libraries.yml
    patching file octavia.skins.yml
    patching file octavia.theme
    patching file src/OctaviaPreRender.php
    patching file src/components/style-guide.md
    

    Still there are some issue remianing

    Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib
    $ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,js,yml octavia
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\octavia\dist\style-guide\kss-assets\rainbow.min.js
    -------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------
     1 | WARNING | File appears to be minified and cannot be processed
    -------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\octavia\README.md
    ----------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------------------
     40 | WARNING | Line exceeds 80 characters; contains 92 characters
    ----------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\octavia\src\style-guide\builder\kss-assets\rainbow.min.js
    --------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------
     1 | WARNING | File appears to be minified and cannot be processed
    --------------------------------------------------------------------------------------------------------------------------
    
    Time: 449ms; Memory: 10MB
    
Production build 0.71.5 2024