Problem/Motivation
command -:
vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig modules/contrib/responsive_image_field/
FILE: /var/www/html/drupal-contri-d10/modules/contrib/responsive_image_field/src/Plugin/Field/FieldWidget/ResponsiveImageFieldWidget.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 1 WARNING AFFECTING 10 LINES
----------------------------------------------------------------------------------------------------------------------------------------
76 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
77 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
78 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
79 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
98 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
99 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
100 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
101 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
102 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
152 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal-contri-d10/modules/contrib/responsive_image_field/src/Plugin/Field/FieldFormatter/ResponsiveImageFieldDefaultFormatter.php
-----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------
71 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
72 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
73 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
74 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
-----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal-contri-d10/modules/contrib/responsive_image_field/css/responsive_image_field.css
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
-----------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal-contri-d10/modules/contrib/responsive_image_field/README.md
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------
14 | WARNING | Line exceeds 80 characters; contains 176 characters
16 | WARNING | Line exceeds 80 characters; contains 175 characters
--------------------------------------------------------------------------------------
FILE: /var/www/html/drupal-contri-d10/modules/contrib/responsive_image_field/responsive_image_field.module
----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------
35 | WARNING | Line exceeds 80 characters; contains 94 characters
----------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal-contri-d10/modules/contrib/responsive_image_field/responsive_image_field.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------
Time: 184ms; Memory: 10MB
Steps to reproduce
Run PHPCS on Config Pages module.
Proposed resolution
Fixed the coding standards.
Remaining tasks
Submit the patch either MR.
Issue fork responsive_image_field-3459855
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:
- 1.x
changes, plain diff MR !5
- 3459855-add-new-phpcs-rules
compare
- 3459855-FIX-PHPCS
changes, plain diff MR !3
Comments
Comment #4
bhaveshdas commentedI have fixed some phpcs issuse and one issuse pending could any one solve this problem
Thankyou !
Comment #7
kewin.nammert commentedHello thanks for the issue! Our organization uses its own standards. I have added configurations to the module.
Comment #8
krystianbrzoza commentedComment #10
krystianbrzoza commentedComment #11
krystianbrzoza commentedComment #12
krystianbrzoza commentedFixed in 1.0.1