Problem/Motivation
FILE: /var/www/html/vb/d_cont/lpl/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
25 | WARNING | Line exceeds 80 characters; contains 89 characters
----------------------------------------------------------------------
FILE: /var/www/html/vb/d_cont/lpl/lpl.module
--------------------------------------------------------------------------------------
FOUND 18 ERRORS AND 1 WARNING AFFECTING 17 LINES
--------------------------------------------------------------------------------------
6 | ERROR | [x] There must be exactly one blank line after the file comment
14 | ERROR | [x] Inline comments must start with a capital letter
14 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
21 | ERROR | [x] Inline comments must start with a capital letter
28 | ERROR | [x] Inline comments must start with a capital letter
35 | ERROR | [x] Inline comments must start with a capital letter
41 | ERROR | [x] Inline comments must start with a capital letter
68 | ERROR | [x] Inline comments must start with a capital letter
68 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
70 | WARNING | [ ] Unused variable $language_entities.
73 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
74 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
76 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
77 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
78 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 8
79 | ERROR | [x] Closing brace indented incorrectly; expected 6 spaces, found 8
80 | ERROR | [x] Closing brace indented incorrectly; expected 4 spaces, found 6
81 | ERROR | [x] Closing brace indented incorrectly; expected 2 spaces, found 4
100 | ERROR | [ ] Invalid function name, expected validate_path but found
| | validatePath
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------
Time: 105ms; Memory: 10MB
Steps to reproduce
Execute: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig lpl/
Remaining tasks
Patch review
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | interdiff_1-3.txt | 1.32 KB | mrinalini9 |
| #3 | coding-standard-fixes_3373816-3.patch | 4.61 KB | mrinalini9 |
| coding-standard-fixes.patch | 4.38 KB | urvashi_vora |
Comments
Comment #2
ashutosh ahirwal commentedI reviewed the provided patch.
There are some remaining error too after patch get applied cleanly.
Need to fix them too.
Moving to Need Works.
Used command:-
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/lpl
Remaining issues
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/lpl/lpl.module
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
68 | ERROR | All functions defined in a module file must be prefixed with the module's name, found "logo_per_language_validate" but expected "lpl_logo_per_language_validate"
101 | ERROR | All functions defined in a module file must be prefixed with the module's name, found "validate_path" but expected "lpl_validate_path"
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 106ms; Memory: 10MB
Comment #3
mrinalini9 commentedUpdated patch #1 by addressing #2, please review it.
Thanks!
Comment #4
elberHi I reviewed the last patch
The module keeps working normally
PHPCS errors has been fixed
Moving to RTBC
Comment #6
abu-zakham commentedThanks, I have change the validate function name to lpl_validate instead of lpl_logo_per_language_validate and removed unwanted language_entities variable.
Comment #7
abu-zakham commentedComment #8
elberHi you forgot my credit, I think I deserve it because I helped the issue with a review
Comment #9
abu-zakham commentedComment #10
elberThank you!