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 .

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

prachi6824 created an issue. See original summary.

prachi6824’s picture

Hello,

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

sourabhjain’s picture

Assigned: prachi6824 » sourabhjain
Status: Active » Needs work

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.

sourabhjain’s picture

Assigned: sourabhjain » Unassigned
Status: Needs work » Needs review
avpaderno’s picture

Title: Phpcs Code Standard Issue » Fix the issues reported by phpcs
Category: Bug report » Task
Status: Needs review » Needs work
Issue tags: +Coding standards, +Needs issue summary update

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.

nitin_lama’s picture

Assigned: Unassigned » nitin_lama
nitin_lama’s picture

StatusFileSize
new46.1 KB

Found one error remaining. Committing changes in the MR.

validation

nitin_lama’s picture

Assigned: nitin_lama » Unassigned
bhaveshithape’s picture

StatusFileSize
new1.26 KB

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

bhaveshithape’s picture

Status: Needs work » Needs review
prabuela’s picture

Assigned: Unassigned » prabuela
StatusFileSize
new1.11 KB
prabuela’s picture

Assigned: prabuela » Unassigned
prabuela’s picture

StatusFileSize
new1021 bytes

Status: Needs review » Needs work

The last submitted patch, 14: 3366199-12.patch, failed testing. View results

ashutosh ahirwal’s picture

Issue summary: View changes
StatusFileSize
new936.62 KB

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

imustakim’s picture

Issue summary: View changes
Issue tags: -Needs issue summary update

Issue summary updated.

keshav.k made their first commit to this issue’s fork.

keshavv’s picture

Status: Needs work » Needs review

Updated MR !60 with latest changes.

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"
-----------------------------------------------------------------------------------------------------

Please review.
Thank you.

aayushmankotia’s picture

Status: Needs review » Reviewed & tested by the community

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

  • adriancid committed 33b281b2 on 3.x
    Issue #3366199 by sourabhjain, PrabuEla, nitin_lama, prachi6824, keshavv...
adriancid’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.