Coding Standard issues

Created on 18 September 2024, 2 months ago

Problem/Motivation

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml .

FILE: .../web/modules/custom/field_add_index/README.md
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 226 characters
9 | WARNING | Line exceeds 80 characters; contains 141 characters
-------------------------------------------------------------------------------

FILE: .../web/modules/custom/field_add_index/field_add_index.module
---------------------------------------------------------------------------------------------------------------------------
FOUND 14 ERRORS AND 4 WARNINGS AFFECTING 11 LINES
---------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
19 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for
| | xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
20 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
20 | ERROR | [ ] Missing parameter comment
20 | ERROR | [ ] Missing parameter type
21 | ERROR | [ ] Missing parameter comment
21 | ERROR | [x] Data types in @param tags need to be fully namespaced
40 | WARNING | [x] A comma should follow the last multiline array item. Found: )
47 | ERROR | [x] Doc comment short description must start with a capital letter
49 | ERROR | [ ] Missing parameter comment
50 | ERROR | [ ] Missing parameter comment
50 | ERROR | [x] Data types in @param tags need to be fully namespaced
69 | WARNING | [ ] Hook implementations should not duplicate @param documentation
69 | ERROR | [ ] Missing parameter comment
69 | ERROR | [ ] Missing parameter type
70 | WARNING | [ ] Hook implementations should not duplicate @param documentation
70 | ERROR | [ ] Missing parameter comment
72 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
---------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml .

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

šŸ‡µšŸ‡ŖPeru alyaj2a

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024