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

Comments

urvashi_vora created an issue. See original summary.

ashutosh ahirwal’s picture

Status: Needs review » Needs work

I 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

mrinalini9’s picture

Status: Needs work » Needs review
StatusFileSize
new4.61 KB
new1.32 KB

Updated patch #1 by addressing #2, please review it.

Thanks!

elber’s picture

Status: Needs review » Reviewed & tested by the community

Hi I reviewed the last patch
The module keeps working normally
PHPCS errors has been fixed
Moving to RTBC

abu-zakham’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, I have change the validate function name to lpl_validate instead of lpl_logo_per_language_validate and removed unwanted language_entities variable.

abu-zakham’s picture

Status: Fixed » Closed (fixed)
elber’s picture

Hi you forgot my credit, I think I deserve it because I helped the issue with a review

abu-zakham’s picture

elber’s picture

Thank you!