Drupal Coding Standard Issue

Created on 31 January 2024, 10 months ago
Updated 3 September 2024, 3 months ago

Problem/Motivation

FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/toastify/js/toastify.js
----------------------------------------------------------------------------------------------
FOUND 44 ERRORS AFFECTING 42 LINES
----------------------------------------------------------------------------------------------
   8 | ERROR |   Expected 1 space after FUNCTION keyword; 0 found
  14 | ERROR |  Expected 1 space after FUNCTION keyword; 0 found
  16 | ERROR |  Expected 1 space after FUNCTION keyword; 0 found
  25 | ERROR |  TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
  33 | ERROR |  TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
  34 | ERROR |  TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
  36 | ERROR |  TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
  41 | ERROR | TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
  42 | ERROR |  TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
  46 | ERROR |  TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
  49 | ERROR | TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
  60 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
  69 | ERROR |  TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
 105 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 120 | ERROR | TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 164 | ERROR | TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 175 | ERROR | TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 186 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 198 | ERROR | TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 213 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 220 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 231 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 245 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 247 | ERROR | TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 259 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 282 | ERROR | Expected 1 space before "+"; 0 found
 282 | ERROR | Expected 1 space after "+"; 0 found
 292 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 320 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 332 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 336 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 346 | ERROR | TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 350 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 359 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 367 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 374 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 397 | ERROR | Expected 1 space after FUNCTION keyword; 0 found
 421 | ERROR | TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 428 | ERROR |  Expected 1 space before "-"; 0 found
 428 | ERROR |  Expected 1 space after "-"; 0 found
 441 | ERROR |  TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 477 | ERROR |  TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
 485 | ERROR |  TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 487 | ERROR |  TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
----------------------------------------------------------------------------------------------


FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/toastify/js/toastify-attach.js
---------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------
 19 | ERROR |  TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
 21 | ERROR |  TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
---------------------------------------------------------------------------------------------


Time: 140ms; Memory: 14MB

📌 Task
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇮🇳India Rohit Rana

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

Comments & Activities

  • Issue created by @Rohit Rana
  • Issue was unassigned.
  • Status changed to Needs review 10 months ago
  • 🇵🇱Poland lamp5 Rzeszow

    Really? Uppercase for vars causes a lot of issues in js....

  • First commit to issue fork.
  • 🇮🇳India Raveen Kumar

    @Iamp5, . I think JavaScript coding conventions, boolean literals like true and false should be in lowercase. It's a widely accepted practice to use lowercase for boolean values in JavaScript. Using lowercase for boolean values aligns with the common JavaScript coding standards and enhances the readability and consistency of the code.

    as per patch #2, the indentation for function() seems to be as per CS but for vars, I wonder how these can be issues.

  • Status changed to Closed: works as designed 3 months ago
Production build 0.71.5 2024