Fix the issues reported by phpcs

Created on 12 June 2023, about 1 year ago
Updated 29 September 2023, 9 months ago

Problem/Motivation

FILE: /Users/specbee/Sites/Projects/admin_toolbar/js/jquery.hoverIntent.js
-------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------
 67 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/admin_toolbar/admin_toolbar_search/css/admin.toolbar_search.css
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
 91 | ERROR | [x] Expected 0 spaces before semicolon in style definition; 1 found
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/admin_toolbar/admin_toolbar_search/js/admin_toolbar_search.js
-------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-------------------------------------------------------------------------------------------------
 13 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
 46 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 61 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
 66 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/admin_toolbar/admin_toolbar_tools/src/AdminToolbarToolsHelper.php
-----------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------
 117 | WARNING | Line exceeds 80 characters; contains 82 characters
-----------------------------------------------------------------------------------------------------

Time: 784ms; Memory: 16MB

Steps to reproduce

Run following command
phpcs --standard=โ€œDrupal,DrupalPracticeโ€ --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js .

๐Ÿ“Œ Task
Status

Fixed

Version

3.4

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Prachi6824

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

Comments & Activities

  • Issue created by @Prachi6824
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Prachi6824

    Hello,

    I have created a patch to solve all the errors related to phpcs code standard.

  • Assigned to sourabhjain
  • Status changed to Needs work about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sourabhjain

    When I am applying the patch it is showing me below errors:

    Checking patch web/modules/contrib/admin_toolbar/admin_toolbar_search/css/admin.toolbar_search.css...
    error: web/modules/contrib/admin_toolbar/admin_toolbar_search/css/admin.toolbar_search.css: No such file or directory
    Checking patch web/modules/contrib/admin_toolbar/admin_toolbar_search/js/admin_toolbar_search.js...
    error: web/modules/contrib/admin_toolbar/admin_toolbar_search/js/admin_toolbar_search.js: No such file or directory
    Checking patch web/modules/contrib/admin_toolbar/js/jquery.hoverIntent.js...
    error: web/modules/contrib/admin_toolbar/js/jquery.hoverIntent.js: No such file or directory

    Let me work on it.

  • Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update about 1 year ago
    Waiting for branch to pass
  • @sourabhjain opened merge request.
  • Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update about 1 year ago
    Waiting for branch to pass
  • Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update about 1 year ago
    Waiting for branch to pass
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update about 1 year ago
    Waiting for branch to pass
  • Status changed to Needs work about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡น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. In this way, project maintainers can verify the patch/MR fixes all the warnings/errors.

  • Assigned to nitin_lama
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama

    Found one error remaining. Committing changes in the MR.

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update about 1 year ago
    14 pass, 4 fail
  • Issue was unassigned.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia bhaveshithape

    Patch to solve all the errors related to phpcs code standard.
    Not interdiff because none of the above patch applied.

  • Status changed to Needs review about 1 year ago
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update about 1 year ago
    Patch Failed to Apply
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update about 1 year ago
    Patch Failed to Apply
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia PrabuEla chennai
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia PrabuEla chennai
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update about 1 year ago
    14 fail
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia PrabuEla chennai
  • Status changed to Needs work about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Ashutosh Ahirwal India

    Addressing #6 and updating issue summary and required command with arguments.
    Please review.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia imustakim Ahmedabad

    Issue summary updated.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia keshav.k

    keshav.k โ†’ made their first commit to this issueโ€™s fork.

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update 11 months ago
    16 pass, 2 fail
  • Status changed to Needs review 11 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia keshav.k

    I have scanned the module against 3.x branch with phpcs ../vendor/bin/phpcs --standard=drupal modules/contrib/admin_toolbar and fix the remaining issues.
    Please do not fix the following JS issues, As it will throw a JS error.

    FILE: /var/www/html/web/modules/contrib/admin_toolbar/js/jquery.hoverIntent.js
    -------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------
     67 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    -------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/web/modules/contrib/admin_toolbar/admin_toolbar_search/js/admin_toolbar_search.js
    -----------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 4 LINES
    -----------------------------------------------------------------------------------------------------
     13 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
     46 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
     61 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
     66 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    -----------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------

    Please review.
    Thank you.

  • Status changed to RTBC 11 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia aayushDrupal

    I've conducted a local test and everything is functioning as expected. It's only presenting JavaScript errors, which we don't require to rectify.
    It appears ready to be transitioned to RTBC

  • Status changed to Fixed 9 months ago
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada adriancid Montreal, Canada
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024