Resolved Coding standard issues.

Created on 6 November 2023, about 1 year ago
Updated 7 August 2024, 4 months ago

Problem/Motivation


FIle /routes_list/routes_list.module
----------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
  7 | ERROR | [x] Whitespace found at end of line
 17 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 34 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 43 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------


FILE: /routes_list/src/Controller/RoutesListController.php
-------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 2 WARNINGS AFFECTING 9 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------
   7 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Routing\RouteProviderInterface.
  18 | ERROR   | [ ] Missing short description in doc comment
  47 | ERROR   | [x] Data types in @param tags need to be fully namespaced
  49 | ERROR   | [x] Data types in @param tags need to be fully namespaced
  51 | ERROR   | [x] Data types in @param tags need to be fully namespaced
  53 | ERROR   | [x] Data types in @param tags need to be fully namespaced
 207 | WARNING | [x] '@TODO: We need to improve this with manual collection and tracking of' should match the format '@todo Fix problem X here.'
 209 | ERROR   | [x] Comma not allowed after last value in single-line array declaration
 209 | ERROR   | [x] Expected one space after the comma, 0 found
 222 | WARNING | [x] '@TODO: Handle entity + view overrides.' should match the format '@todo Fix problem X here.'
-------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------

Time: 85ms; Memory: 12MB

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ› Bug report
Status

RTBC

Version

6.0

Component

Code

Created by

šŸ‡®šŸ‡³India adwivedi008

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

  • Issue created by @adwivedi008
  • Status changed to Needs review about 1 year ago
  • šŸ‡®šŸ‡³India adwivedi008

    Resolved remaining coding standard issues.

    Please review

  • Status changed to Needs work 6 months ago
  • Hi @adwivedi008,

    Applied your patch successfully, but it still threw one error.

    routes_list git:(8.x-6.x) curl https://www.drupal.org/files/issues/2023-11-06/3399445-2.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  4078  100  4078    0     0   5063      0 --:--:-- --:--:-- --:--:--  5142
    patching file routes_list.module
    patching file src/Controller/RoutesListController.php
    āžœ  routes_list git:(8.x-6.x) āœ— cd ..
    āžœ  contrib git:(master) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig routes_list
    
    FILE: ...ns/Demo-site/drupal-orgissue-v9/web/modules/contrib/routes_list/css/routes_list.css
    -----------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------
     15 | ERROR | [x] CSS colours must be defined in lowercase; expected #f00 but found #F00
    -----------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------
    
    Time: 185ms; Memory: 10MB

    Kindly check.

    Thanks,
    Jake

  • First commit to issue fork.
  • Merge request !5Issue #3399445: fixed the phpcs. ā†’ (Open) created by Unnamed author
  • Status changed to Needs review 6 months ago
  • šŸ‡®šŸ‡³India atul_ghate

    I have fixed remaining phpcs issue. please review and merge the MR

  • šŸ‡®šŸ‡³India riddhi.addweb

    The mentioned phpcs issue is resolved, & I have also checked and it is working as expected. I am attaching the Screenshots & doing RTBC for the same.

  • Status changed to RTBC 5 months ago
  • šŸ‡®šŸ‡³India sourav_paul Kolkata

    phpcs issue is resolved after applying the patch...

    attaching ss with this comment.

Production build 0.71.5 2024