Problem/Motivation

The current main branch 2.0.x has a gitlab pipeline that uses the PHPCS tool to find problems in this repository's coding style. At the moment the tool is being ignored.

Steps to reproduce

Go to https://git.drupalcode.org/project/config_snapshot/-/jobs/2780334
See

$ vendor/bin/phpcs -s $_WEB_ROOT/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source $_PHPCS_EXTRA
FILE: ...t/web/modules/custom/config_snapshot/src/ConfigSnapshotServiceProvider.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 4 LINES
--------------------------------------------------------------------------------
 46 | ERROR   | [x] Expected newline after closing brace
    |         |     (Drupal.ControlStructures.ControlSignature.NewlineAfterCloseBrace)
 47 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks,
    |         |     question marks, colons, or closing parentheses
    |         |     (Drupal.Commenting.InlineComment.InvalidEndChar)
 51 | ERROR   | [x] Expected newline after closing brace
    |         |     (Drupal.ControlStructures.ControlSignature.NewlineAfterCloseBrace)
 52 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
    |         |     (Drupal.Files.LineLength.TooLong)
 52 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks,
    |         |     question marks, colons, or closing parentheses
    |         |     (Drupal.Commenting.InlineComment.InvalidEndChar)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 157ms; Memory: 6MB
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE                                                            ERRORS  WARNINGS
--------------------------------------------------------------------------------
...ustom/config_snapshot/src/ConfigSnapshotServiceProvider.php  4       1
--------------------------------------------------------------------------------
A TOTAL OF 4 ERRORS AND 1 WARNING WERE FOUND IN 7 FILES
--------------------------------------------------------------------------------
PHPCBF CAN FIX 4 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
---------------------------------------------------------------------------
    SOURCE                                                            COUNT
---------------------------------------------------------------------------
[x] Drupal.Commenting.InlineComment.InvalidEndChar                    2
[x] Drupal.ControlStructures.ControlSignature.NewlineAfterCloseBrace  2
[ ] Drupal.Files.LineLength.TooLong                                   1
---------------------------------------------------------------------------
A TOTAL OF 5 SNIFF VIOLATIONS WERE FOUND IN 3 SOURCES
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SOURCES AUTOMATICALLY (4 VIOLATIONS IN TOTAL)
---------------------------------------------------------------------------

Proposed resolution

Address the CODE SNIFFER VIOLATIONs

Remaining tasks

User interface changes

API changes

Data model changes

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

trackleft2 created an issue. See original summary.

rohan_singh’s picture

Assigned: Unassigned » rohan_singh

I am working on this.

rohan_singh’s picture

Assigned: rohan_singh » Unassigned
Status: Active » Needs review

Hi @trackleft2, I have raised an MR.
Please review.

Thanks
Rohan Singh

joegraduate’s picture

Status: Needs review » Reviewed & tested by the community

LGTM. Thanks @rohan_singh!

joegraduate’s picture

Status: Reviewed & tested by the community » Fixed

Merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.