Fix the issues reported by PHPCS

Created on 15 May 2024, 6 months ago

FILE: /home/addweb/Drupal8-vagrant/web/web/body_node_id_class/body_node_id_class.module
---------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
22 | ERROR | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------

FILE: /home/addweb/Drupal8-vagrant/web/web/body_node_id_class/README.md
-----------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
-----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 114 characters
11 | WARNING | Line exceeds 80 characters; contains 118 characters
12 | WARNING | Line exceeds 80 characters; contains 97 characters
13 | WARNING | Line exceeds 80 characters; contains 83 characters
17 | WARNING | Line exceeds 80 characters; contains 92 characters
-----------------------------------------------------------------------

๐Ÿ“Œ Task
Status

Needs review

Version

1.1

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

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

Comments & Activities

  • Issue created by @dev16.addweb
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines clarkssquared

    Hi

    I applied the patch and I confirmed that it fixes the PHPCS issues and the remaining issue occurs when a module is installed via composer.

    โžœ  body_node_id_class git:(master) โœ— curl https://www.drupal.org/files/issues/2024-05-15/resolve_phpcs_issues.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  1982  100  1982    0     0   3242      0 --:--:-- --:--:-- --:--:--  3281
    patching file README.md
    patching file body_node_id_class.module
    โžœ  body_node_id_class git:(master) โœ— ..
    โžœ  contrib git:(master) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml body_node_id_class 
    
    FILE: ...9-local/web/modules/contrib/body_node_id_class/body_node_id_class.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
    --------------------------------------------------------------------------------
    
    Time: 104ms; Memory: 10MB
    
    โžœ  contrib git:(master) โœ— 

    RTBC +1 from me, I will retain the status to Needs Review for others to review the patch

  • Status changed to RTBC 16 days ago
  • ๐Ÿ‡ญ๐Ÿ‡ทCroatia tamerzg

    Pushed the fix for:
    The PHP open tag must be followed by exactly one blank line
    Expected 1 newline at end of file; 2 found

    Other issues are related to README.md which is a markdown file, not a PHP file. PHPCS tool typically focuses on PHP code style issues, not Markdown files, and itโ€™s unusual to report warnings or errors on non-PHP files like README.md.

  • ๐Ÿ‡ญ๐Ÿ‡ทCroatia tamerzg

    Will be released in 2.0.1

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

Production build 0.71.5 2024