Problem/Motivation
❯ phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js .
FILE: /Users/specbee/Sites/Projects/secure_html/secure_html.module
-------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------
6 | ERROR | [x] Doc comment short description must be on the first line
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------
FILE: /Users/specbee/Sites/Projects/secure_html/src/Plugin/Filter/SecureHtmlFilter.php
--------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------------
9 | ERROR | [ ] Missing short description in doc comment
27 | ERROR | [x] list(...) is forbidden, use [...] instead.
43 | ERROR | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------
Time: 110ms; Memory: 10MB
Steps to reproduce
Run following command
phpcs --standard=“Drupal,DrupalPractice” --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js .
Comments
Comment #2
shanu chouhan commentedI have Created a patch to fix this issue.
Comment #3
avpadernoComment #6
dineshkumarbollu commentedHi
The patch#2 applied cleanly but found 1 phpcbf warning that is fixed in the MR.
Thanks.
Comment #7
avpadernoSince that comment is edited, the description should be changed too. (Hook implementations for the Secure html module.)
Wraps is misspelled, since it has been capitalized when it should not.
Also, the report shown in the issue summary is for a single file, but the MR changes two files. Either the report is updated or the MR changes what the report says to change.
Comment #8
dineshkumarbollu commentedHi
I changed the 2 comment which reported above, while running phpcs command before applying patch changes are in 2 files.
Thanks
Comment #9
avpadernoThere are extra plus/minus signs that need to be removed.
There are two periods at the end of the description instead of one.
Comment #10
imustakim commentedComment #11
imustakim commentedPatch updated.
Please review.
Comment #12
avpadernoThe module name is Secure html, not Secure HTML.
A definite article is missing after for.
The report shows warnings/errors for a single file, but the patch changes two files. Either the patch changes only the file for which the issue summary reports warnings/errors or the report is changed to reflect the changes done.
Comment #13
imustakim commentedComment #14
imustakim commentedPatch updated.
Please review.
Comment #17
anrkaid commented