Coding standards issue

Created on 6 December 2024, about 2 months ago

Problem/Motivation

FILE: ...jqcloud/tests/src/FunctionalJavascript/JqcloudJavascriptTest.php
--------------------------------------------------------------------------------------------------------------------------------------FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------- 5 | WARNING | [x] Unused use statement
511 | WARNING | [x] '@todo: Write code for checking custom_colors appears.' should match the format '@todo Fix problem X here.'
--------------------------------------------------------------------------------------------------------------------------------------PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------

FILE: ...jqcloud/src/TermServiceInterface.php
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
9 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
27 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

FILE: ...jqcloud/src/Plugin/Block/JqcloudBlock.php
----------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------
26 | ERROR | [x] Expected 2 spaces before interface name; 4 found
61 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
75 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------

FILE: ...jqcloud/src/TermService.php
---------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------
14 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
61 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
90 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
90 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

Time: 149ms; Memory: 12MB

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Active

Version

3.0

Component

Code

Created by

šŸ‡ØšŸ‡“Colombia kinyein

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

Merge Requests

Comments & Activities

  • Issue created by @kinyein
  • šŸ‡ØšŸ‡“Colombia kinyein

    kinyein ā†’ changed the visibility of the branch 3492334-coding-standards-issue to hidden.

  • Merge request !5Coding standards fix ā†’ (Closed) created by kinyein
  • šŸ‡ØšŸ‡“Colombia kinyein

    Hi, I made a merge request to fix the coding standards issue in this module, I hope it can be reviewed soon.

  • šŸ‡µšŸ‡­Philippines clarkssquared

    Hi kinyein,

    I applied your MR !5 and I can still see many PHPCS issues in the module

    āžœ  jqcloud git:(3.0.x) curl https://git.drupalcode.org/project/jqcloud/-/merge_requests/5.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  3889    0  3889    0     0    776      0 --:--:--  0:00:05 --:--:--  1026
    patching file 'src/Plugin/Block/JqcloudBlock.php'
    patching file 'src/TermService.php'
    patching file 'src/TermServiceInterface.php'
    patching file 'tests/src/FunctionalJavascript/JqcloudJavascriptTest.php'
    āžœ  jqcloud git:(3.0.x) āœ— ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml jqcloud 
    
    FILE: ...rib/jqcloud/tests/modules/jqcloud_library_test/jqcloud_library_test.module
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     9 | ERROR | [x] Use statements should be sorted alphabetically. The first
       |       |     wrong one is Drupal\Core\Routing\RouteMatchInterface.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...ib/jqcloud/tests/modules/jqcloud_library_test/jqcloud_library_test.install
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     1 | ERROR | [x] Missing file doc comment
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...s/contrib/jqcloud/tests/src/FunctionalJavascript/JqcloudJavascriptTest.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 19 WARNINGS AFFECTING 19 LINES
    --------------------------------------------------------------------------------
     211 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     256 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     269 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     283 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     296 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     315 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     330 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     352 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     366 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     376 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     393 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     410 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     434 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     458 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     472 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     489 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     505 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     540 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     542 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
    --------------------------------------------------------------------------------
    
    
    FILE: ...ts/drupal-issues/drupal-project/web/modules/contrib/jqcloud/jqcloud.module
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     9 | ERROR | [x] Use statements should be sorted alphabetically. The first
       |       |     wrong one is Drupal\Core\Link.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...upal-project/web/modules/contrib/jqcloud/src/Plugin/Block/JqcloudBlock.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     11 | ERROR | [x] Use statements should be sorted alphabetically. The first
        |       |     wrong one is
        |       |     Drupal\Core\Plugin\ContainerFactoryPluginInterface.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...upal-issues/drupal-project/web/modules/contrib/jqcloud/src/TermService.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     9 | ERROR | [x] Use statements should be sorted alphabetically. The first
       |       |     wrong one is Drupal\Core\Cache\DatabaseBackend.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    Time: 375ms; Memory: 12MB
    
    āžœ  contrib git:(main) āœ— 
    
  • šŸ‡®šŸ‡³India lavanyatalwar

    Working on it

  • šŸ‡®šŸ‡³India lavanyatalwar

    The phpcs pipeline is green now.
    But still phpstan, eslint, stylelint, cspell fail.

  • šŸ‡ØšŸ‡¦Canada danrod Ottawa

    I'll have a look on this later this week, assigning it to myself.

  • šŸ‡ØšŸ‡¦Canada danrod Ottawa
  • šŸ‡ØšŸ‡¦Canada danrod Ottawa
  • šŸ‡ØšŸ‡¦Canada danrod Ottawa

    This was fixed in another issue: https://www.drupal.org/project/jqcloud/issues/3499505#comment-15948036 šŸ“Œ Switch jQCloud to Gitlab CI for automated testing Active

    I'll close this issue and give you credits to whoever worked on this, thanks !

  • šŸ‡ØšŸ‡¦Canada danrod Ottawa
Production build 0.71.5 2024