Fix the PHP_CodeSniffer issues reported by GitLab CI

Created on 14 November 2022, over 1 year ago
Updated 1 May 2024, about 2 months ago

GitLab CI reports PHP_CodeSniffer warnings/errors that should be fixed.

The remaining ones are the following.

FILE: .../web/modules/custom/jcarousel-3321157/src/Plugin/views/style/Jcarousel.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\Core\Form\FormStateInterface.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...es/custom/jcarousel-3321157/src/Controller/JcarouselViewAjaxController.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 15 | ERROR | [x] Use statements should be sorted alphabetically. The first
    |       |     wrong one is
    |       |     Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException.
    |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...ue/jcarousel-3321157/web/modules/custom/jcarousel-3321157/jcarousel.module
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
   9 | ERROR   | [x] Use statements should be sorted alphabetically. The first
     |         |     wrong one is Drupal\Core\Routing\RouteMatchInterface.
     |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
 505 | WARNING | [ ] The @see url 'jcarousel_theme()' does not match the
     |         |     standard: http(s)://www.drupal.org/node/n or
     |         |     http(s)://www.drupal.org/project/aaa/issues/n
     |         |     (Drupal.Commenting.Deprecated.DeprecatedWrongSeeUrlFormat)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 253ms; Memory: 8MB
📌 Task
Status

Needs review

Version

6.0

Component

Code

Created by

🇮🇳India yashmalviya

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India himanshu_jhaloya Mandsaur

    After applying the patch still facing some Coding standard issues created a new patch to improve the code base

  • Issue was unassigned.
  • Status changed to Needs work over 1 year ago
  • 🇮🇳India Sonal Gyanani

    After applying patch #9 still shows following errors

    FILE: ...htdocs\drupalissues-9.5.x-dev\modules\jcarousel\jcarousel.module
    ----------------------------------------------------------------------
    FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 10 LINES
    ----------------------------------------------------------------------
      13 | WARNING | Global constants should not be used, move it to a
         |         | class or interface
      74 | ERROR   | Doc comment is empty
     140 | ERROR   | Doc comment is empty
     231 | ERROR   | Doc comment is empty
     324 | ERROR   | Doc comment is empty
     461 | ERROR   | Type hint "array" missing for $images
     461 | ERROR   | Type hint "array" missing for $options
     504 | ERROR   | The text '@deprecated Please use render arrays with
         |         | element theme 'jcarousel' instead.' does not match
         |         | the standard format: @deprecated in
         |         | %deprecation-version% and is removed from
         |         | %removal-version%. %extra-info%.
     505 | WARNING | The @see url 'jcarousel_theme()' does not match the
         |         | standard: http(s)://www.drupal.org/node/n or
         |         | http(s)://www.drupal.org/project/aaa/issues/n
     507 | ERROR   | Type hint "array" missing for $options
     647 | ERROR   | Type hint "array" missing for $items
     647 | ERROR   | Type hint "array" missing for $options
    ----------------------------------------------------------------------
    
    

    Moving it to Needs work

  • 🇮🇳India Akram Khan Cuttack, Odisha

    added updated patch fixed all coding standard issues those are remaining that are not fixable

  • Assigned to elber
  • Status changed to Needs review over 1 year ago
  • 🇧🇷Brazil elber Brazil

    I will review the patch 12.

  • Merge request !7Issue #3321157: Fix Coding Standard Issue → (Open) created by elber
  • Issue was unassigned.
  • 🇧🇷Brazil elber Brazil

    Hi I did a reroll and fixed the phpcs errors please revise.

  • First commit to issue fork.
  • 🇧🇷Brazil lucienchalom

    I fixed some more CS problems, the unused variables and the "global constant should not be used"

  • Assigned to elber
  • 🇧🇷Brazil elber Brazil

    I will do a review.

  • Issue was unassigned.
  • Status changed to RTBC over 1 year ago
  • 🇧🇷Brazil elber Brazil

    HI moving to RTBC:

    Module keeps working as expected
    Phpcs errors was fixed.

    Just this errors are remaining:

    FOUND 2 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------------------------------------
     236 | ERROR | Style definitions must end with a semicolon
     262 | ERROR | Style definitions must end with a semicolon
    ----------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/elber/Documentos/Environments/Drupal10/drupal-10.1.x-dev/modules/contrib/jcarousel/skins/tango/jcarousel-tango.css
    ------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ------------------------------------------------------------------------------------------------------------------------------
     254 | ERROR | Style definitions must end with a semicolon
     281 | ERROR | Style definitions must end with a semicolon
    -----------------------------------------------------------------------------

    But I think these errors very hard to fix and you should open another issue to fix it.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command and arguments have been used, and which report that command shown.

  • Status changed to Needs work about 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Assigned to nitin_lama
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • Status changed to RTBC about 1 year ago
  • 🇧🇷Brazil lucienchalom

    folowing the issue sumary, the only problems remaining were cited in #7 and #19.
    The MR is still okay and no new coding standard were added.
    moving to RTBC

  • Status changed to Needs work about 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Needs review about 1 year ago
  • 🇧🇷Brazil lucienchalom

    Added back the deprecation tag, the See tag after it will report a problem, because there is no link apropriated to it. The function was deprecated ouside a Drupal.org issue:
    original commit

    I also separate the upercase and lowercase fixes in a diferent commit, and tried to fix the most of the inconsistencies.
    I hope its better now.
    Please review

  • Status changed to RTBC 2 months ago
  • 🇮🇳India Jaydev Bhatt Pune, Maharashtra

    Reviewed/ Verified the merge request and found no new PHPCS errors. Moving this issue to RTBC status.

  • Pipeline finished with Success
    about 2 months ago
    Total: 151s
    #161486
  • Status changed to Needs review about 2 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Pipeline finished with Success
    about 2 months ago
    Total: 119s
    #161497
  • Pipeline finished with Success
    about 2 months ago
    Total: 145s
    #161504
  • Pipeline finished with Success
    about 2 months ago
    Total: 216s
    #161511
Production build 0.69.0 2024