To fix all the issues listed in parview.sh

Your README.md does not follow best practices (headings need to be uppercase). See https://www.drupal.org/node/2181737 .
The INTRODUCTION section is missing.
The REQUIREMENTS section is missing.
The INSTALLATION section is missing.
The CONFIGURATION section is missing.
The clear_field.module does not implement hook_help(). See https://www.drupal.org/docs/develop/documenting-your-project/module-docu... .
Coder Sniffer has found some issues with your code (please check the Drupal coding standards). See attachment.
ESLint has found some issues with your code (please check the JavaScript coding standards).
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/clear-field.js: line 11, col 66, Error - Expected '===' and instead saw '=='. (eqeqeq)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/clear-field.js: line 14, col 66, Error - Expected '!==' and instead saw '!='. (eqeqeq)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/clear-field.js: line 37, col 9, Error - Closing curly brace appears on the same line as the subsequent block. (brace-style)

3 problems
DrupalPractice has found some issues with your code, but could be false positives.

FILE: .../drupal/pareviewsh/pareview_temp/src/Form/ClearFieldSettingsForm.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------
126 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
126 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
--------------------------------------------------------------------------

FILE: ...te1101/web/vendor/drupal/pareviewsh/pareview_temp/clear_field.module
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------
43 | WARNING | There must be no blank line following an inline comment
--------------------------------------------------------------------------

Time: 277ms; Memory: 4Mb
No automated test cases were found, did you consider writing PHPUnit tests? This is not a requirement but encouraged for professional software development.
This automated report was generated with PAReview.sh, your friendly project application review script.

FILE: ...e1101/web/vendor/drupal/pareviewsh/pareview_temp/clear_field.install
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
12 | ERROR | Inline doc block comments are not allowed; use "/* Comment
| | */" or "// Comment" instead
--------------------------------------------------------------------------

FILE: .../drupal/pareviewsh/pareview_temp/src/Form/ClearFieldSettingsForm.php
--------------------------------------------------------------------------
FOUND 127 ERRORS AND 3 WARNINGS AFFECTING 102 LINES
--------------------------------------------------------------------------
9 | ERROR | [x] There must be one blank line after the last USE
| | statement; 2 found;
13 | ERROR | [x] Doc comment short description must end with a full
| | stop
15 | ERROR | [x] Additional blank lines found at end of doc comment
19 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
21 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
22 | ERROR | [ ] Doc comment short description must start with a
| | capital letter
23 | ERROR | [x] Doc comment short description must end with a full
| | stop
23 | ERROR | [ ] Doc comment short description must be on a single
| | line, further text should be a separate paragraph
24 | ERROR | [ ] Missing @var tag in member variable comment
25 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
25 | ERROR | [ ] Class property $module_handler should use lowerCamel
| | naming without underscores
27 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
27 | ERROR | [x] Missing function doc comment
28 | ERROR | [x] Opening brace should be on the same line as the
| | declaration
29 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
30 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
32 | ERROR | [x] Missing function doc comment
33 | ERROR | [x] Opening brace should be on the same line as the
| | declaration
34 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
35 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: SETTINGS
37 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
39 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
41 | ERROR | [x] There must be exactly one blank line before the tags
| | in a doc comment
41 | ERROR | [ ] Missing parameter comment
41 | ERROR | [x] Data types in @param tags need to be fully
| | namespaced
42 | ERROR | [ ] Missing parameter comment
42 | ERROR | [x] Data types in @param tags need to be fully
| | namespaced
42 | ERROR | [x] Parameter comment must be on the next line
42 | ERROR | [x] There must be no blank lines after the function
| | comment
44 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
45 | ERROR | [x] Opening brace should be on the same line as the
| | declaration
46 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
47 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
48 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
50 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
50 | ERROR | [ ] Missing short description in doc comment
50 | ERROR | [ ] Parameter $container is not described in comment
51 | ERROR | [ ] Missing parameter comment
51 | ERROR | [ ] Doc comment for parameter $form does not match
| | actual variable name $container
52 | ERROR | [ ] Missing parameter comment
52 | ERROR | [ ] Doc comment for parameter $form_state does not match
| | actual variable name $container
52 | ERROR | [x] Data types in @param tags need to be fully
| | namespaced
53 | ERROR | [ ] Description for the @return value is missing
55 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
56 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
60 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
62 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
62 | ERROR | [x] Missing function doc comment
63 | ERROR | [x] Opening brace should be on the same line as the
| | declaration
64 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
65 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
67 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
69 | WARNING | [ ] Line exceeds 80 characters; contains 127 characters
69 | ERROR | [x] No space found before comment text; expected "//
| | 'cf_webkit' => $this->t('Use only Webkit for Chrome
| | / Safari / IE [convert input type = “text” to
| | type=“search”]')," but found "//'cf_webkit' =>
| | $this->t('Use only Webkit for Chrome / Safari / IE
| | [convert input type = “text” to
| | type=“search”]'),"
70 | WARNING | [ ] Line exceeds 80 characters; contains 143 characters
70 | ERROR | [x] No space found before comment text; expected "//
| | 'cf_autocomplete_text' => $this->t('Text along with
| | X for Autocomplete (show text) and only X for
| | text, email and phone fields')," but found
| | "//'cf_autocomplete_text' => $this->t('Text along
| | with X for Autocomplete (show text) and only X for
| | text, email and phone fields'),"
70 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, colons, question marks, or closing
| | parentheses
72 | ERROR | [x] No space found before comment text; expected "//
| | 'cf_x' => $this->t('Only Simple X ')," but found
| | "//'cf_x' => $this->t('Only Simple X '),"
72 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, colons, question marks, or closing
| | parentheses
74 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
75 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
76 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
77 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
78 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
81 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
82 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
83 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
84 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
85 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
86 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
87 | ERROR | [x] Array indentation error, expected 14 spaces but
| | found 16
88 | ERROR | [x] Array indentation error, expected 18 spaces but
| | found 20
88 | ERROR | [x] Short array syntax must be used to define arrays
93 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
94 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
95 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
96 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
97 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
98 | ERROR | [x] Array indentation error, expected 14 spaces but
| | found 16
99 | ERROR | [x] Array indentation error, expected 18 spaces but
| | found 20
99 | ERROR | [x] Short array syntax must be used to define arrays
104 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
109 | ERROR | [x] Array indentation error, expected 12 spaces but
| | found 13
110 | ERROR | [x] Short array syntax must be used to define arrays
115 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
116 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
117 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
118 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
119 | ERROR | [x] Array indentation error, expected 10 spaces but
| | found 12
120 | ERROR | [x] Array indentation error, expected 14 spaces but
| | found 16
121 | ERROR | [x] Array indentation error, expected 18 spaces but
| | found 20
121 | ERROR | [x] Short array syntax must be used to define arrays
125 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
126 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found
| | 12
126 | ERROR | [x] Expected one space after the comma, 0 found
127 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
129 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
130 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
132 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
132 | ERROR | [x] Missing function doc comment
133 | ERROR | [x] Opening brace should be on the same line as the
| | declaration
134 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
135 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
136 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found
| | 10
136 | ERROR | [x] A unary operator statement must not be followed by a
| | space
137 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found
| | 14
137 | ERROR | [x] There should be no white space before a closing ")"
138 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found
| | 10
139 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
140 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
142 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
142 | ERROR | [x] Missing function doc comment
143 | ERROR | [x] Opening brace should be on the same line as the
| | declaration
144 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
145 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
146 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
147 | ERROR | [x] Object operator not indented correctly; expected 10
| | spaces but found 12
149 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
150 | ERROR | [x] Object operator not indented correctly; expected 10
| | spaces but found 12
152 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
153 | ERROR | [x] Object operator not indented correctly; expected 10
| | spaces but found 12
155 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
156 | ERROR | [x] Object operator not indented correctly; expected 10
| | spaces but found 12
158 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
159 | ERROR | [x] Object operator not indented correctly; expected 10
| | spaces but found 12
161 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 8
162 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
162 | ERROR | [x] Expected 1 blank line after function; 0 found
163 | ERROR | [x] The closing brace for the class must have an empty
| | line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 115 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

FILE: ...te1101/web/vendor/drupal/pareviewsh/pareview_temp/clear_field.module
--------------------------------------------------------------------------
FOUND 23 ERRORS AND 6 WARNINGS AFFECTING 19 LINES
--------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
6 | 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."
9 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
11 | ERROR | [x] Array indentation error, expected 8 spaces but found
| | 9
24 | 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."
27 | WARNING | [ ] Line exceeds 80 characters; contains 113 characters
27 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
27 | ERROR | [x] No space found before comment text; expected "//
| | Implement a config file to decide on whether to add
| | clear_field icon on this form for text and email
| | fields" but found "//Implement a config file to
| | decide on whether to add clear_field icon on this
| | form for text and email fields"
28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
29 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
29 | ERROR | [ ] Comment indentation error, expected only 1 spaces
29 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, colons, question marks, or closing parentheses
30 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
31 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
33 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
39 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: )
42 | WARNING | [ ] Line exceeds 80 characters; contains 127 characters
42 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
42 | ERROR | [x] No space found before comment text; expected "//
| | implement js such that it does not double during
| | adding multiple options you can reproduce the issue
| | on paragraph module." but found "//implement js such
| | that it does not double during adding multiple
| | options you can reproduce the issue on paragraph
| | module."
42 | ERROR | [x] Inline comments must start with a capital letter
43 | WARNING | [x] There must be no blank line following an inline
| | comment
43 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
43 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, colons, question marks, or closing parentheses
45 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
46 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
47 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
49 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
49 | ERROR | [x] Expected one space after the comma, 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 24 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 621ms; Memory: 4Mb

https://pareview.sh/pareview/https-git.drupal.org-project-clear_field.gi...

CommentFileSizeAuthor
#9 3117681-9.patch17.48 KBhash6
#9 interdiff_3-9.txt720 byteshash6
#7 3117681-3.patch17.44 KBhash6
#3 3117681-3.patch17.44 KBhash6

Comments

hash6 created an issue. See original summary.

hash6’s picture

Title: Fix issues mentioned in https://pareview.sh/ » Fix issues mentioned in PAReview.sh
hash6’s picture

StatusFileSize
new17.44 KB
hash6’s picture

hash6’s picture

Status: Active » Needs review
hash6’s picture

Title: Fix issues mentioned in PAReview.sh » Fix issues mentioned in PARview.sh
hash6’s picture

StatusFileSize
new17.44 KB
abhisekmazumdar’s picture

Status: Needs review » Reviewed & tested by the community

The patch looks Perfect.

hash6’s picture

StatusFileSize
new720 bytes
new17.48 KB

  • hash6 committed 1168c5a on 8.x-1.x
    Issue #3117681 by hash6: Fix issues mentioned in PARview.sh
    
hash6’s picture

Assigned: hash6 » Unassigned
Status: Reviewed & tested by the community » Fixed

Thanks @abhisekmazumdar for the review. !!!

hash6’s picture

Status: Fixed » Closed (fixed)