Fix the issues reported by PHP_CodeSniffer

Created on 7 September 2024, 4 months ago
Updated 9 September 2024, 4 months ago

Problem/Motivation

FILE: factory_lollipop\CHANGELOG.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
61 | WARNING | Line exceeds 80 characters; contains 85 characters
----------------------------------------------------------------------

FILE: factory_lollipop\CONTRIBUTING.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 14 WARNINGS AFFECTING 14 LINES
----------------------------------------------------------------------
36 | WARNING | Line exceeds 80 characters; contains 89 characters
41 | WARNING | Line exceeds 80 characters; contains 116 characters
55 | WARNING | Line exceeds 80 characters; contains 149 characters
59 | WARNING | Line exceeds 80 characters; contains 106 characters
61 | WARNING | Line exceeds 80 characters; contains 84 characters
79 | WARNING | Line exceeds 80 characters; contains 116 characters
80 | WARNING | Line exceeds 80 characters; contains 117 characters
82 | WARNING | Line exceeds 80 characters; contains 101 characters
85 | WARNING | Line exceeds 80 characters; contains 89 characters
91 | WARNING | Line exceeds 80 characters; contains 90 characters
101 | WARNING | Line exceeds 80 characters; contains 95 characters
102 | WARNING | Line exceeds 80 characters; contains 97 characters
112 | WARNING | Line exceeds 80 characters; contains 305 characters
123 | WARNING | Line exceeds 80 characters; contains 85 characters
----------------------------------------------------------------------

FILE: factory_lollipop\factory_lollipop.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------

FILE: factory_lollipop\factory_lollipop.services.yml
------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------
112 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------

FILE: factory_lollipop\modules\factory_lollipop_paragraphs\factory_lollipop_paragraphs.info.yml
-------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------------------

FILE:
factory_lollipop\modules\factory_lollipop_paragraphs\tests\modules\factory_lollipop_paragraphs_test\factory_lollipop_paragraphs_test.info.yml
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: factory_lollipop\README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 18 WARNINGS AFFECTING 18 LINES
----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 139 characters
5 | WARNING | Line exceeds 80 characters; contains 92 characters
11 | WARNING | Line exceeds 80 characters; contains 93 characters
13 | WARNING | Line exceeds 80 characters; contains 121 characters
15 | WARNING | Line exceeds 80 characters; contains 140 characters
20 | WARNING | Line exceeds 80 characters; contains 167 characters
22 | WARNING | Line exceeds 80 characters; contains 202 characters
23 | WARNING | Line exceeds 80 characters; contains 113 characters
25 | WARNING | Line exceeds 80 characters; contains 98 characters
27 | WARNING | Line exceeds 80 characters; contains 181 characters
39 | WARNING | Line exceeds 80 characters; contains 177 characters
40 | WARNING | Line exceeds 80 characters; contains 118 characters
49 | WARNING | Line exceeds 80 characters; contains 83 characters
96 | WARNING | Line exceeds 80 characters; contains 113 characters
98 | WARNING | Line exceeds 80 characters; contains 104 characters
99 | WARNING | Line exceeds 80 characters; contains 98 characters
101 | WARNING | Line exceeds 80 characters; contains 247 characters
108 | WARNING | Line exceeds 80 characters; contains 108 characters
----------------------------------------------------------------------

FILE: factory_lollipop\tests\modules\factory_lollipop_test\factory_lollipop_test.info.yml
-------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------------

FILE: factory_lollipop\UPGRADING.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
5 | WARNING | Line exceeds 80 characters; contains 141 characters
7 | WARNING | Line exceeds 80 characters; contains 217 characters
----------------------------------------------------------------------

Steps to reproduce

Run phpcs command to get the drupal coding standard issues.

Proposed resolution

Many of the issues can be fixed by running the phpcbf command. For the remaining ones, we will need to manually address and then commit these changes before pushing them.

📌 Task
Status

Needs review

Version

1.2

Component

Code

Created by

🇺🇸United States sunil jolapara 3265 Summitrun Drive, Independence, KY, 41051

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @sunil jolapara
  • Status changed to Active 4 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Needs work 4 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Issues to fix PHP_CodeSniffer errors/warnings needs to show the arguments passed to phpcs and the report produced using those arguments.

  • 🇨🇭Switzerland wengerk Lausanne

    I'm not sure in markdown files we should break lines on any code examples. Even if phpcs says so, this is not a very good practice and make the code less readable.

    People who copy the commands from the markdown files would have problems, if the command is split in two lines.

    It is possible to tell phpcs to ignore a rule for the full file.
    We should look at what Devel did with a phpcsxml dist file and ignore the 80 limit chars for markdown files
    https://www.drupal.org/project/devel/issues/3133703

    I'm in favor of reverting changes on:

    • FILE: factory_lollipop\UPGRADING.md. Change lines length except codes sample & command line
    • FILE: factory_lollipop\README.md. Change lines length except codes sample & command line
    • FILE: factory_lollipop\CONTRIBUTING.md. Change lines length except codes sample & command line.
    • FILE: factory_lollipop\CHANGELOG.md: Keep it intact. We use Keep a Changelog format
  • First commit to issue fork.
  • Merge request !6Fixed All phpcs issue → (Open) created by Unnamed author
  • Status changed to Needs review 4 months ago
  • 🇮🇳India sarwan_verma

    Hi,
    I have resolved all the PHPCS issues and created MR!6. For more clarity, I have attached a screenshot.
    Kindly review it.
    Thanks!.

  • Pipeline finished with Success
    4 months ago
    Total: 330s
    #277726
Production build 0.71.5 2024