Fix the issues reported by PHP_CodeSniffer

Created on 20 September 2024, 3 months ago

Problem/Motivation

FILE: modules\drutopia_people\drutopia_people.install
-----------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
7 | ERROR | [x] Expected 1 blank line before function; 2 found
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------

FILE: modules\drutopia_people\README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
5 | WARNING | Line exceeds 80 characters; contains 128 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

2.0

Component

Code

Created by

šŸ‡ŗšŸ‡øUnited States sunil jolapara 3265 Summitrun Drive, Independence, KY, 41051

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

Merge Requests

Comments & Activities

  • Issue created by @sunil jolapara
  • Status changed to Needs review 3 months ago
  • šŸ‡ŗšŸ‡øUnited States sunil jolapara 3265 Summitrun Drive, Independence, KY, 41051
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    The issue summary for PHP_CodeSniffer issues should always show the report given from PHP_CodeSniffer and the arguments passed to phpcs.

    Furthermore, since GitLab CI is now enabled for all the projects, GitLab CI should be used to get PHP_CodeSniffer errors/warnings.

  • šŸ‡®šŸ‡³India zaryab_drupal Bhopal
  • Pipeline finished with Failed
    about 2 months ago
    Total: 48s
    #319377
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    avpaderno ā†’ changed the visibility of the branch 3475741-gitlab-ci-reports to hidden.

  • First commit to issue fork.
  • Merge request !3Added Gitlab CI ā†’ (Open) created by cleavinjosh
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    cleavinjosh ā†’ changed the visibility of the branch 3475741-phpcs-issues to hidden.

  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Found more issues after I ran phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml:

    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml drutopia_people
    
    FILE: /Users/interns/Demo-site/drupal_11_test/install-dir/drupal_11_test_site/web/modules/contrib/drutopia_people/drutopia_people.info.yml
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 21 WARNINGS AFFECTING 21 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
      6 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
      7 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
      8 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
      9 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     10 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     11 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     12 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     13 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     14 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     15 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     16 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     17 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     18 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     19 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     20 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     21 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     22 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     23 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     24 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     25 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     26 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 166ms; Memory: 10MB
    
    āžœ  contrib git:(main) āœ—
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi,

    Please review, check, and advise on MR!1.

    Thank you.

Production build 0.71.5 2024