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 phpcsyarn lint:jsyarn lint:cssyarn 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
- Issue #3307464 by mitthukumawat, Dharti Patel, Rajab Natshah: Fixed Drupal coding standard and Drupal Practice for Varbase Media Hero Slider
Issue fork varbase_heroslider_media-3307464
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:
- 3307464-phpcs-coding-standard
changes, plain diff MR !12 /
changes, plain diff MR !13
Comments
Comment #2
dharti patel commentedComment #3
dharti patel commentedHello,
I have created a patch to fix this issue.
Kindly review the patch.
Thanks!
Comment #8
rajab natshahThe fixes changes code in wrong format
like
Comment #9
rajab natshahUsing the following commands:
Please, follow with ⚒ Contributing
Check Standards/Practice Coding And Linting
Tested:
Comment #10
rajab natshahNoticed that you'd added js to the phpcs check
Better to Lint JS with
yarn lint:jsComment #11
rajab natshahComment #12
rajab natshahComment #13
rajab natshahMoving to check with:
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 phpcsyarn lint:jsyarn lint:cssyarn lint:yamlComment #14
rajab natshahComment #17
rajab natshahComment #18
rajab natshahComment #19
rajab natshahComment #20
rajab natshahComment #21
rajab natshahComment #22
rajab natshah✅ Released varbase_heroslider_media-9.0.6
Comment #23
rajab natshah✅ Released Varbase 9.0.9