Drupal PHPCS issue

Created on 8 March 2024, 10 months ago
Updated 28 April 2024, 8 months ago

Hi @AstonVictorand other maintainers

Referred source
when I run the command
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
for your module and I found this

FILE: /var/www/html/web/modules/contrib/tagadelic/src/TagadelicCloudView.php
---------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------
26 | ERROR | Class property $count_field should use lowerCamel naming without underscores
33 | ERROR | Class property $override_sort should use lowerCamel naming without underscores
---------------------------------------------------------------------------------------------

FILE: /var/www/html/web/modules/contrib/tagadelic/css/tagadelic.css
------------------------------------------------------------------------------
FOUND 15 ERRORS AFFECTING 15 LINES
------------------------------------------------------------------------------
4 | ERROR | [x] There must be no space before a colon in a style definition
12 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
13 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
17 | ERROR | [x] There must be no space before a colon in a style definition
20 | ERROR | [x] There must be no space before a colon in a style definition
23 | ERROR | [x] There must be no space before a colon in a style definition
26 | ERROR | [x] There must be no space before a colon in a style definition
29 | ERROR | [x] There must be no space before a colon in a style definition
32 | ERROR | [x] There must be no space before a colon in a style definition
35 | ERROR | [x] There must be no space before a colon in a style definition
38 | ERROR | [x] There must be no space before a colon in a style definition
41 | ERROR | [x] There must be no space before a colon in a style definition
44 | ERROR | [x] There must be no space before a colon in a style definition
45 | ERROR | [x] Expected 1 newline at end of file; 2 found
46 | ERROR | [x] Additional whitespace found at end of file
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 15 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------

FILE: /var/www/html/web/modules/contrib/tagadelic/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 144 characters
----------------------------------------------------------------------

I created Patch for the above fixes
Hope you value my time and efforts.
Thank You !!

šŸ“Œ Task
Status

Needs review

Version

4.0

Component

Code

Created by

šŸ‡®šŸ‡³India Harpreet_singh_saluja

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

Merge Requests

Comments & Activities

  • Issue created by @Harpreet_singh_saluja
  • First commit to issue fork.
  • Merge request !163426585 - Fix CS ā†’ (Merged) created by AstonVictor
  • First commit to issue fork.
  • Merge request !17issue #3426585 - Drupal PHPCS issue ā†’ (Open) created by AimadBachar
  • šŸ‡«šŸ‡·France AimadBachar

    Hello,
    The proposed patch tagadelic_coding_standard.patch #2 doesn't work. I've made a merge request that does the same thing

  • Status changed to Needs review 8 months ago
  • šŸ‡µšŸ‡­Philippines clarkssquared

    Hi

    I applied MR !17 and there are PHPCS issues that were reported

    āžœ  tagadelic git:(master) āœ— curl https://git.drupalcode.org/project/tagadelic/-/merge_requests/17.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  4299    0  4299    0     0   8480      0 --:--:-- --:--:-- --:--:--  8615
    patching file README.md
    patching file 'css/tagadelic.css'
    patching file 'src/TagadelicCloudView.php'
    āžœ  tagadelic git:(master) āœ— ..
    āžœ  contrib git:(master) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml tagadelic 
    
    FILE: ...bing/Projects/d9/d9-local/web/modules/contrib/tagadelic/tagadelic.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: ...ing/Projects/d9/d9-local/web/modules/contrib/tagadelic/tagadelic.theme.inc
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     28 | ERROR | The array declaration extends to column 106 (the limit is 80).
        |       | The array content should be split up over multiple lines
    --------------------------------------------------------------------------------
    
    
    FILE: ...jects/d9/d9-local/web/modules/contrib/tagadelic/src/TagadelicCloudBase.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    --------------------------------------------------------------------------------
      93 | WARNING | Unused private method sortByname()
     100 | WARNING | Unused private method sortBycount()
    --------------------------------------------------------------------------------
    
    
    FILE: .../d9/d9-local/web/modules/contrib/tagadelic/src/Tests/TagadelicMenuTest.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     24 | ERROR | The array declaration extends to column 102 (the limit is 80).
        |       | The array content should be split up over multiple lines
    --------------------------------------------------------------------------------
    
    
    FILE: .../d9-local/web/modules/contrib/tagadelic/src/Tests/TagadelicServiceTest.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     121 | ERROR | The array declaration extends to column 81 (the limit is 80).
         |       | The array content should be split up over multiple lines
    --------------------------------------------------------------------------------
    
    
    FILE: ...d9/d9-local/web/modules/contrib/tagadelic/src/Tests/TagadelicAdminTest.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     33 | ERROR | The array declaration extends to column 102 (the limit is 80).
        |       | The array content should be split up over multiple lines
    --------------------------------------------------------------------------------
    
    Time: 532ms; Memory: 10MB
    
    āžœ  contrib git:(master) āœ— 
    
Production build 0.71.5 2024