Fix Drupal coding standard and Drupal Practice for Varbase Media Hero Slider

Created on 2 September 2022, over 2 years ago
Updated 12 September 2023, over 1 year ago

Problem/Motivation

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,yaml,feature,js,json,ts,tsx,feature,twig

FILE: /home/drupal/myproject/varbase_heroslider_media/package.json
-------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------
 140 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------

FILE: /home/drupal/myproject/varbase_heroslider_media/gulpfile.js
---------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------
 18 | ERROR | [x] Expected 0 spaces before opening parenthesis; 1 found
 21 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 25 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
 37 | ERROR | [x] Expected 0 spaces before opening parenthesis; 1 found
---------------------------------------------------------------------------------------------

FILE: /home/drupal/myproject/varbase_heroslider_media/varbase_heroslider_media.install
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------
  16 | WARNING | Line exceeds 80 characters; contains 99 characters
 102 | WARNING | Line exceeds 80 characters; contains 82 characters
---------------------------------------------------------------------------------------------

FILE: /home/drupal/myproject/varbase_heroslider_media/templates/node--varbase-heroslider-media.html.twig
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
 132 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------------

FILE: /home/drupal/myproject/varbase_heroslider_media/js/video.heroslider.local.js
-------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------
 15 | ERROR | [x] Expected 1 space before "-"; 0 found
 15 | ERROR | [x] Expected 1 space after "-"; 0 found
 34 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 55 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
-------------------------------------------------------------------------------------------

FILE: /home/drupal/myproject/varbase_heroslider_media/js/video.heroslider.youtube.js
---------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------
 17 | ERROR | [x] Expected 1 space before "-"; 0 found
 17 | ERROR | [x] Expected 1 space after "-"; 0 found
 29 | ERROR | [x] Expected 1 space before "-"; 0 found
 29 | ERROR | [x] Expected 1 space after "-"; 0 found
 65 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
---------------------------------------------------------------------------------------------

FILE: /home/drupal/myproject/varbase_heroslider_media/js/video.heroslider.vimeo.js
---------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------
 17 | ERROR | [x] Expected 1 space before "-"; 0 found
 17 | ERROR | [x] Expected 1 space after "-"; 0 found
 29 | ERROR | [x] Expected 1 space before "-"; 0 found
 29 | ERROR | [x] Expected 1 space after "-"; 0 found
 65 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
---------------------------------------------------------------------------------------------

FILE: /home/drupal/myproject/varbase_heroslider_media/js/oembed-frame.heroslider.youtube.js
--------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
--------------------------------------------------------------------------------------------------
  29 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
  73 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
  82 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
  95 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
  97 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
 110 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
--------------------------------------------------------------------------------------------------

FILE: /home/drupal/myproject/varbase_heroslider_media/js/oembed-frame.heroslider.vimeo.js
------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
------------------------------------------------------------------------------------------------
 30 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
 40 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 41 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 42 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 43 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
 56 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 75 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
------------------------------------------------------------------------------------------------

Proposed resolution

Moving to check with:

phpcs --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml,js /var/www/html/products/varbase_heroslider_media/ --ignore="/var/www/html/products/varbase_heroslider_media/node_modules/,gulpfile.js"

phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml,js /var/www/html/products/varbase_heroslider_media/ --ignore="/var/www/html/products/varbase_heroslider_media/node_modules/,gulpfile.js"

Using the local configs for checks:

  • yarn phpcs
  • yarn lint:js
  • yarn lint:css
  • yarn lint:yaml

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release Varbase 9.0.9 , varbase_heroslider_media-9.0.6

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

📌 Task
Status

Fixed

Version

9.0

Component

Code

Created by

🇮🇳India Dharti Patel

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

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024