Problem/Motivation
vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/config_profile/
FILE: /var/www/html/vbd9/web/modules/contrib/config_profile/src/Form/Settings.php
--------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------
11 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
74 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/vbd9/web/modules/contrib/config_profile/src/Plugin/ConfigFilter/ProfileFilter.php
----------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 9 LINES
----------------------------------------------------------------------------------------------------------------------
13 | ERROR | [x] Doc comment short description must end with a full stop
23 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
104 | ERROR | [ ] Missing parameter comment
105 | ERROR | [ ] Missing parameter comment
105 | ERROR | [ ] Missing parameter type
106 | ERROR | [ ] Missing parameter comment
106 | ERROR | [ ] Missing parameter type
107 | ERROR | [ ] Missing parameter comment
127 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
127 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
138 | ERROR | [ ] Missing parameter type
146 | WARNING | [ ] The use of function fnmatch() is discouraged
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/vbd9/web/modules/contrib/config_profile/config_profile.info.yml
-----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------
9 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------
FILE: /var/www/html/vbd9/web/modules/contrib/config_profile/config_profile.links.menu.yml
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------
FILE: /var/www/html/vbd9/web/modules/contrib/config_profile/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------
11 | WARNING | Line exceeds 80 characters; contains 314 characters
19 | WARNING | Line exceeds 80 characters; contains 309 characters
27 | WARNING | Line exceeds 80 characters; contains 398 characters
28 | WARNING | Line exceeds 80 characters; contains 316 characters
29 | WARNING | Line exceeds 80 characters; contains 110 characters
33 | WARNING | Line exceeds 80 characters; contains 220 characters
----------------------------------------------------------------------
Time: 340ms; Memory: 12MB
Steps to reproduce
Proposed resolution
RUN:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/config_profile/
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | Screenshot from 2023-05-08 21-26-43.png | 17.65 KB | dineshkumarbollu |
| #3 | with patch.png | 240.54 KB | kenyoowen |
| #3 | without patch.png | 297.4 KB | kenyoowen |
| #2 | codingstandars-3358359-2.patch | 7.02 KB | dineshkumarbollu |
Issue fork config_profile-3358359
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
dineshkumarbollu commentedHi
i fixed all phpcs issues except
146 | WARNING | [ ] The use of function fnmatch() is discouraged
please review
Comment #3
kenyoowen commentedHi dineshkumarbollu
I applied patch#2 to the “Config Profile” module and it has 2 remaining issues one issue is you mentioned in the comment but the other issue is in the description. Please see the screenshots attached.
For your review.
Thank you.
Comment #5
akshaydalvi212 commentedi will work on this and update with an MR.
Comment #7
akshaydalvi212 commentedRemoved both dependency injection and fnmatch() warning.
raised the MR with all the changes.
kindly review the MR.
Comment #8
dineshkumarbollu commentedHi
The MR!2 looks fine. No phpcs errors found
Thanks
Comment #9
naveenvalechaComment #11
naveenvalechaPR has been merged to 8.x-1.x