Problem/Motivation
Getting following error/warnings:
FILE: D:\xampp\htdocs\project_10\web\modules\contrib\tiny_slider\README.md
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------
12 | WARNING | Line exceeds 80 characters; contains 250 characters
19 | WARNING | Line exceeds 80 characters; contains 106 characters
--------------------------------------------------------------------------
FILE: D:\xampp\htdocs\project_10\web\modules\contrib\tiny_slider\src\Plugin\Field\FieldFormatter\TinySliderFieldFormatter.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 25 WARNINGS AFFECTING 25 LINES
-----------------------------------------------------------------------------------------------------------------------------
386 | WARNING | Unused variable $autoplayposition.
390 | WARNING | Unused variable $controlsplayposition.
399 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
400 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
401 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
402 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
403 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
404 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
405 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
406 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
407 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
408 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
409 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
410 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
411 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
412 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
413 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
414 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
415 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
416 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
419 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
423 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
427 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
431 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
476 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\project_10\web\modules\contrib\tiny_slider\tiny_slider.module
-----------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------
79 | WARNING | Unused variable $view.
-----------------------------------------------------------------------------------
Steps to reproduce
Run following command:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml tiny_slider/
Proposed resolution
Above error/warnings need to be fixed
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3374650-after-MR10.png | 71.51 KB | clarkssquared |
| #4 | interdiff_2-4.txt | 506 bytes | mrinalini9 |
| #4 | 3374650-4.patch | 27.89 KB | mrinalini9 |
| #3 | 3374650-after-patch.png | 72.81 KB | clarkssquared |
| #2 | 3374650-2.patch | 27.9 KB | arti_parmar |
Issue fork tiny_slider-3374650
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
Comment #2
arti_parmar commentedKindly review patch.
Comment #3
clarkssquared commentedHi arti_parmar
I applied your patch and I confirmed that it fixed all the PHPCS errors/issues. However, there are whitespace errors in your patch, kindly fix all the whitespace errors in your patch and it will be all good.
Please look at the screenshot I attached for your reference.
Thank you
Comment #4
mrinalini9 commentedUpdated patch #2 by addressing #3, please review it.
Thanks!
Comment #7
frederikvhoHi,
As I still received a few remaining PHPCS errors I created an issue fork and opened up a merge request.
Summary: Applied the patch from comment #4 and fixed the remaining PHPCS errors.
Please review.
Thanks!
Comment #8
clarkssquared commentedHi Frederikvho
I applied your MR !10 to the module and I confirmed that it applies cleanly and fixed all the PHPCS errors/issues.
Please look at the screenshot I attached for your reference.
Thank you
Comment #9
ipwa commentedMerge request needs to be rebased for 1.1.x
Comment #11
sakthi_dev commentedDid rebase to 1.1.x and fixed the issues. Please review.
Comment #12
clarkssquared commentedI applied MR !10 and I confirmed that it fixes all the PHPCS issues except for
I updated the MR !10 to fix this error,
please review.
Comment #14
welly commentedLooks good to me - I've also committed the gitlab-ci template so we can take advantage of running automated tests (mainly phpcs at this point).
Comment #15
welly commentedAlso cleaned up the CSS as per the stylelint feedback from Gitlab. Obviously this will need testing to make sure it all still works/looks correct!
Comment #16
chandansha commentedi used below command and get some error use below command.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig .