- Issue created by @Rash Robie
- 🇮🇳India vishal.kadam Mumbai
Thank you for applying!
Please read Review process for security advisory coverage: What to expect → for more details and Security advisory coverage application checklist → to understand what reviewers look for. Tips for ensuring a smooth review → gives some hints for a smoother review.
The important notes are the following.
- If you have not done it yet, you should run
phpcs --standard=Drupal,DrupalPractice
on the project, which alone fixes most of what reviewers would report. - For the time this application is open, only your commits are allowed.
- The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status won't be changed by this application and no other user will be able to opt projects into security advisory policy.
- We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.
To the reviewers
Please read How to review security advisory coverage applications → , Application workflow → , What to cover in an application review → , and Tools to use for reviews → .
The important notes are the following.
- It is preferable to wait for a Code Review Administrator before commenting on newly created applications. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
- Reviewers should show the output of a CLI tool → only once per application.
- It may be best to have the applicant fix things before further review.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues → .
- If you have not done it yet, you should run
- Issue was unassigned.
- 🇮🇳India rushiraval
I am changing the issue priority as per issue priorities → .
- Status changed to Needs work
9 months ago 12:39pm 11 March 2024 - 🇮🇳India rushiraval
solve the phpcs Error
phpcs --standard=Drupal,DrupalPractice web/modules/contrib/search_tracking/FILE: web/modules/contrib/search_tracking/js/formData.js
-------------------------------------------------------------------------------------------
FOUND 20 ERRORS AFFECTING 11 LINES
-------------------------------------------------------------------------------------------
9 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
9 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
14 | ERROR | [x] Expected 1 space before "+"; 0 found
14 | ERROR | [x] Expected 1 space after "+"; 0 found
14 | ERROR | [x] Expected 1 space before "+"; 0 found
14 | ERROR | [x] Expected 1 space after "+"; 0 found
33 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
33 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
38 | ERROR | [x] Expected 1 space before "+"; 0 found
38 | ERROR | [x] Expected 1 space after "+"; 0 found
38 | ERROR | [x] Expected 1 space before "+"; 0 found
38 | ERROR | [x] Expected 1 space after "+"; 0 found
57 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
76 | ERROR | [x] Expected 1 newline at end of file; 8 found
79 | ERROR | [ ] More than 2 empty lines are not allowed
80 | ERROR | [ ] More than 2 empty lines are not allowed
81 | ERROR | [ ] More than 2 empty lines are not allowed
82 | ERROR | [ ] More than 2 empty lines are not allowed
83 | ERROR | [ ] More than 2 empty lines are not allowed
83 | ERROR | [x] Additional whitespace found at end of file
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 15 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------FILE: web/modules/contrib/search_tracking/src/Form/SearchTrackingConfig.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 88 ERRORS AND 4 WARNINGS AFFECTING 73 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
5 | ERROR | [x] Doc comment short description must end with a full stop
12 | WARNING | [x] Unused use statement
12 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
16 | ERROR | [x] Function comment short description must start with exactly one space
16 | ERROR | [x] Doc comment short description must end with a full stop
19 | ERROR | [x] Opening brace should be on the same line as the declaration
21 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
21 | ERROR | [x] Missing function doc comment
22 | ERROR | [x] Opening brace should be on the same line as the declaration
23 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
24 | WARNING | [x] A comma should follow the last multiline array item. Found: 'search_tracking.settings'
26 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
31 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
32 | ERROR | [x] Opening brace should be on the same line as the declaration
33 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
34 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
36 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
39 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
40 | ERROR | [x] Opening brace should be on the same line as the declaration
41 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
43 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
44 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
45 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
46 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
47 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
47 | ERROR | [ ] The array declaration extends to column 84 (the limit is 80). The array content should be split up over multiple lines
47 | ERROR | [x] Short array syntax must be used to define arrays
47 | WARNING | [ ] #options values usually have to run through t() for translation
48 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
50 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
51 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
52 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
53 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
54 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
54 | ERROR | [x] Short array syntax must be used to define arrays
55 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
55 | ERROR | [x] Short array syntax must be used to define arrays
55 | ERROR | [x] Short array syntax must be used to define arrays
57 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
59 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
60 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
61 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
62 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
63 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
63 | ERROR | [x] Short array syntax must be used to define arrays
64 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
64 | ERROR | [x] Short array syntax must be used to define arrays
64 | ERROR | [x] Short array syntax must be used to define arrays
66 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
68 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
69 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
70 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
71 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
72 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
72 | ERROR | [x] Short array syntax must be used to define arrays
73 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
73 | ERROR | [x] Short array syntax must be used to define arrays
73 | ERROR | [x] Short array syntax must be used to define arrays
75 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
77 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
78 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
79 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
80 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
81 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
82 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
83 | ERROR | [x] Array indentation error, expected 18 spaces but found 20
89 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
92 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
93 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
95 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
98 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
98 | WARNING | [ ] Possible useless method overriding detected
99 | ERROR | [x] Opening brace should be on the same line as the declaration
100 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
101 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
101 | ERROR | [x] Expected 1 blank line after function; 0 found
102 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
105 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
106 | ERROR | [x] Opening brace should be on the same line as the declaration
107 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
108 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
108 | ERROR | [x] Expected 1 blank line after function; 0 found
109 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
112 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
113 | ERROR | [x] Opening brace should be on the same line as the declaration
114 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
115 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
116 | ERROR | [x] Object operator not indented correctly; expected 10 spaces but found 12
122 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
122 | ERROR | [x] Expected 1 blank line after function; 0 found
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 89 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------FILE: web/modules/contrib/search_tracking/src/Controller/searchTrackingController.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 8 WARNINGS AFFECTING 16 LINES
------------------------------------------------------------------------------------------------------------------------------------------
6 | WARNING | [x] Unused use statement
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Symfony\Component\HttpFoundation\JsonResponse.
8 | WARNING | [x] Unused use statement
8 | ERROR | [x] When importing a class with "use", do not include a leading \
9 | WARNING | [x] Unused use statement
14 | ERROR | [ ] Class name must begin with a capital letter
16 | ERROR | [x] Missing function doc comment
18 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
19 | ERROR | [x] Expected 1 space after IF keyword; 0 found
19 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
20 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
24 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
24 | ERROR | [x] Whitespace found at end of line
25 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
33 | ERROR | [ ] Public method name "searchTrackingController::search_tracking" is not in lowerCamel format
33 | ERROR | [x] Missing function doc comment
34 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
37 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
42 | ERROR | [x] Expected 1 blank line after function; 0 found
43 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------FILE: web/modules/contrib/search_tracking/search_tracking.views.inc
---------------------------------------------------------------------------------------------------
FOUND 31 ERRORS AFFECTING 30 LINES
---------------------------------------------------------------------------------------------------
4 | ERROR | [x] The second line in the file doc comment must be "@file"
5 | ERROR | [x] There must be no blank lines after the function comment
8 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
9 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
10 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
11 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
12 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
15 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
16 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
17 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
18 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
19 | ERROR | [x] Array indentation error, expected 10 spaces but found 8
22 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
23 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
24 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
25 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
26 | ERROR | [x] Array indentation error, expected 10 spaces but found 8
29 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
30 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
31 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
32 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
33 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
35 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
36 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
37 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
39 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
40 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
43 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
44 | ERROR | [x] Expected 1 newline at end of file; 2 found
44 | ERROR | [x] Whitespace found at end of line
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 31 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------- - 🇮🇳India vishal.kadam Mumbai
@Rushikesh Raval It is preferable to not use PHPCode_Sniffer for JavaScript files. It would try to apply PHP rules to JavaScript files, even when those are not correct; for example, it would report that NULL must be used, while null, true, and false are used in JavaScript code.
- 🇮🇳India rushiraval
@vishal.kadam thank for your guidance. It is noted for future review.
- Status changed to Closed: won't fix
3 months ago 7:13am 30 August 2024 - 🇮🇳India vishal.kadam Mumbai
This thread has been idle, in the Needs work state with no activity for several months. Therefore, I am assuming that you are no longer pursuing this application, and I marked it as Closed (won't fix).
If this is incorrect, and you are still pursuing this application, then please feel free to re-open it and set the issue status to Needs work or Needs review, depending on the current status of your code.