PHPCS CI job fails since drupal/coder:8.3.24

Created on 2 May 2024, 8 months ago
Updated 16 May 2024, 7 months ago

Problem/Motivation

Since Validate trailing comma in multi-line function declaration Active landed and shipped in https://www.drupal.org/project/coder/releases/8.3.24 , the PHPCS CI job fails like this:

$ vendor/bin/phpcs -s $_WEB_ROOT/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source $_PHPCS_EXTRA
FILE: /builds/project/cdn/web/modules/custom/cdn/src/CdnFarfutureController.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 27 | ERROR | [x] Multi-line function declarations must have a trailing comma
    |       |     after the last parameter
    |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...es/custom/cdn/src/StackMiddleware/DuplicateContentPreventionMiddleware.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 100 | ERROR | [x] Multi-line function declarations must have a trailing comma
     |       |     after the last parameter
     |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: /builds/project/cdn/web/modules/custom/cdn/src/File/FileUrlGenerator.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 49 | ERROR | [x] Multi-line function declarations must have a trailing comma
    |       |     after the last parameter
    |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...roject/cdn/web/modules/custom/cdn/src/EventSubscriber/ConfigSubscriber.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 38 | ERROR | [x] Multi-line function declarations must have a trailing comma
    |       |     after the last parameter
    |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 477ms; Memory: 6MB
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE                                                            ERRORS  WARNINGS
--------------------------------------------------------------------------------
...t/cdn/web/modules/custom/cdn/src/CdnFarfutureController.php  1       0
...modules/custom/cdn/src/EventSubscriber/ConfigSubscriber.php  1       0
...ct/cdn/web/modules/custom/cdn/src/File/FileUrlGenerator.php  1       0
...rc/StackMiddleware/DuplicateContentPreventionMiddleware.php  1       0
--------------------------------------------------------------------------------
A TOTAL OF 4 ERRORS AND 0 WARNINGS WERE FOUND IN 26 FILES
--------------------------------------------------------------------------------
PHPCBF CAN FIX 4 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
-----------------------------------------------------------------------------
    SOURCE                                                              COUNT
-----------------------------------------------------------------------------
[x] Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma  4
-----------------------------------------------------------------------------
A TOTAL OF 4 SNIFF VIOLATIONS WERE FOUND IN 1 SOURCE
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SOURCES AUTOMATICALLY (4 VIOLATIONS IN TOTAL)
-----------------------------------------------------------------------------

https://git.drupalcode.org/project/cdn/-/pipelines/152939

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

4.0

Component

Code

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

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

Production build 0.71.5 2024