Drupal Coding Standards Issues | phpcs

Created on 15 June 2023, over 1 year ago
Updated 31 December 2023, 12 months ago

Problem/Motivation

Getting following error/warnings

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\zuvi\css\material.css
------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------
7 | ERROR | No style definition found on line; check for missing colon
8 | ERROR | No style definition found on line; check for missing colon
9 | ERROR | No style definition found on line; check for missing colon
------------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\zuvi\css\style-old.css
---------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 10 LINES
---------------------------------------------------------------------------
25 | ERROR | No style definition found on line; check for missing colon
26 | ERROR | No style definition found on line; check for missing colon
34 | ERROR | No style definition found on line; check for missing colon
35 | ERROR | No style definition found on line; check for missing colon
43 | ERROR | No style definition found on line; check for missing colon
44 | ERROR | No style definition found on line; check for missing colon
704 | ERROR | No style definition found on line; check for missing colon
705 | ERROR | No style definition found on line; check for missing colon
706 | ERROR | No style definition found on line; check for missing colon
2035 | ERROR | Style definitions must end with a semicolon
---------------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\zuvi\README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
17 | WARNING | Line exceeds 80 characters; contains 148 characters
----------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\zuvi\theme-settings.php
--------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 3 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------------------------------
8 | ERROR | Doc comment is empty
20 | ERROR | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
331 | WARNING | Do not pass empty strings to t()
337 | WARNING | Do not pass empty strings to t()
390 | WARNING | Do not pass empty strings to t()
507 | ERROR | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
--------------------------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\zuvi\zuvi.theme
-----------------------------------------------------------------------------------------------------------------------
FOUND 141 ERRORS AFFECTING 75 LINES
-----------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
2 | ERROR | [x] There must be one blank line after the last USE statement; 0 found;
8 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
11 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
12 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
14 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
14 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
15 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
15 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
17 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
17 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
18 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
18 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
19 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
19 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
20 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
20 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
20 | ERROR | [x] Expected newline after closing brace
21 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
21 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
22 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
22 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
23 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
23 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
24 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
25 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
27 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
31 | ERROR | [x] You must use "/**" style comments for a function comment
32 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
33 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
33 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
34 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
34 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
35 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
36 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
36 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
37 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
37 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
39 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
39 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
40 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
40 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
41 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
41 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
42 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
42 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
43 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
43 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
44 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
44 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
45 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
45 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
49 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
49 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
50 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
50 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
51 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
51 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
52 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
52 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
53 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
53 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
54 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
54 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
55 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
55 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
56 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
56 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
56 | ERROR | [x] Expected 1 space after IF keyword; 0 found
57 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
57 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
58 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
58 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
59 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
59 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
60 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
60 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
61 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
61 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
62 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
62 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
63 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
63 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
63 | ERROR | [x] Expected 1 space after IF keyword; 0 found
64 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
64 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
65 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
65 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
66 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
66 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
72 | ERROR | [x] You must use "/**" style comments for a function comment
73 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
73 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
74 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
74 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
80 | ERROR | [x] You must use "/**" style comments for a function comment
81 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
81 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
84 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
87 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
90 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
90 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
91 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
91 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
92 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
92 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
93 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
93 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
94 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
94 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
95 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
95 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
96 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
96 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
97 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
97 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
103 | ERROR | [x] You must use "/**" style comments for a function comment
104 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
104 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
105 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
105 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
106 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
106 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
107 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
107 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
108 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
108 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
109 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
109 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
109 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
110 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
111 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
111 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
112 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
112 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
113 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
113 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 140 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run following command:

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

Proposed resolution

Above error/warnings need to be fixed

🐛 Bug report
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇮🇳India arti_parmar

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

Comments & Activities

Production build 0.71.5 2024