FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\react_doc_viewer\css\style.css
---------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------
1 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\react_doc_viewer\js\README.md
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
23 | WARNING | Line exceeds 80 characters; contains 95 characters
34 | WARNING | Line exceeds 80 characters; contains 171 characters
36 | WARNING | Line exceeds 80 characters; contains 322 characters
38 | WARNING | Line exceeds 80 characters; contains 271 characters
--------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\react_doc_viewer\js\src\App.css
----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\react_doc_viewer\js\src\index.css
------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | ERROR | [ ] No style definition found on line; check for missing colon
12 | ERROR | [ ] No style definition found on line; check for missing colon
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\react_doc_viewer\oldjs\README.md
-----------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
-----------------------------------------------------------------------------------
23 | WARNING | Line exceeds 80 characters; contains 95 characters
34 | WARNING | Line exceeds 80 characters; contains 171 characters
36 | WARNING | Line exceeds 80 characters; contains 322 characters
38 | WARNING | Line exceeds 80 characters; contains 271 characters
-----------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\react_doc_viewer\oldjs\src\App.css
-------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\react_doc_viewer\oldjs\src\index.css
---------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | ERROR | [ ] No style definition found on line; check for missing colon
12 | ERROR | [ ] No style definition found on line; check for missing colon
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\react_doc_viewer\react_doc_viewer.info.yml
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-----------------------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\react_doc_viewer\react_doc_viewer.install
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\react_doc_viewer\react_doc_viewer.module
-------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
10 | ERROR | [x] There must be exactly one blank line after the file comment
14 | ERROR | [x] Expected 1 blank line before function; 0 found
20 | ERROR | [x] Expected 1 newline at end of file; 2 found
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\react_doc_viewer\src\Controller\ReactDocViewerController.php
--------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
19 | WARNING | [x] A comma should follow the last multiline array item. Found: 'react_doc_viewer/react_doc_viewer'
20 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
24 | ERROR | [x] Missing function doc comment
25 | ERROR | [x] Opening brace should be on the same line as the declaration
27 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\react_doc_viewer\src\Plugin\Field\FieldFormatter\RdvFieldFormatter.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
-------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
23 | ERROR | [x] Opening brace should be on the same line as the declaration
29 | ERROR | [x] Opening brace should be on the same line as the declaration
42 | ERROR | [x] Expected newline after closing brace
56 | ERROR | [x] Data types in @param tags need to be fully namespaced
63 | ERROR | [x] Opening brace should be on the same line as the declaration
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\react_doc_viewer\src\Plugin\rest\resource\ReactDocViewverRestResource.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 15 ERRORS AFFECTING 14 LINES
----------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
23 | ERROR | [x] Opening brace should be on the same line as the declaration
36 | ERRO | [x] Opening brace should be on the same line aRs the declaration
46 | ERROR | [ ] Missing parameter comment
55 | ERROR | [x] Opening brace should be on the same line as the declaration
57 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
58 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
59 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
67 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 5
68 | ERROR | [x] Expected 1 space after "=>"; 2 found
68 | ERROR | [x] Concat operator must be surrounded by a single space
70 | ERROR | [x] Array closing indentation error, expected 5 spaces but found 6
72 | ERROR | [x] Expected newline after closing brace
73 | ERROR | [x] Space found before comma in argument list
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | no-error.png | 12.14 KB | anoopsingh92 |
| #6 | Drupal-standard-coding-issues-3301065-6.patch | 11.94 KB | anoopsingh92 |
| #2 | Drupal-standard-coding-issues-3301065-2.patch | 12.01 KB | Harsh panchal |
Issue fork react_doc_viewer-3301065
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
Harsh panchal commentedI have fixed this issue and providing a patch.
Comment #3
meeni_dhobale commented@harsh-panchal I reviewed the patch Drupal-standard-coding-issues-3301065-2.patch mentioned in #1. This patch resolved all the coding standard issues, Only dependency injection is remain. Following are issue shown by the PHPCS:
FILE: /app/modules/contrib/react_doc_viewer/css/style.css
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] Additional whitespace found at start of file
----------------------------------------------------------------------
FILE: ...rib/react_doc_viewer/src/Controller/ReactDocViewerController.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
29 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
30 | WARNING | File::load calls should be avoided in classes, use
| | dependency injection instead
----------------------------------------------------------------------
Comment #4
Harsh panchal commentedHi @Meeni_Dhobale
dependency injection they are drupal practice issue so i will created another issue for dependences injection
Comment #5
anoopsingh92Comment #6
anoopsingh92Hi, I have fixed pending
phpcscoding standard issues. Please review this patch. ThanksComment #7
anoopsingh92Comment #8
meeni_dhobale commented@anoopsingh92 Thank you for the patch. I will review it.
Comment #9
harivenuvHi Anoopsingh92,
php /var/www/html/vendor/bin/phpcs --standard="Drupal,DrupalPractice" -n --extensions="php,yml,css,install,module,twig" /var/www/html/web/modules/contrib/react_doc_viewer
FILE: /var/www/html/web/modules/contrib/react_doc_viewer/css/style.css
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 147ms; Memory: 10MB
Tried the patch #6 but still showing one issue
Comment #10
anoopsingh92Hi @harivenuv, thank for verifying the patch. You are telling about the style.css error. This error is reflecting after running phpcs. This is not an error because this file is blank. When you will run phpcbf command this error will go. Otherwise we can add one comment in this empty css file then this error also gone.
Thanks.
Comment #11
anoopsingh92+1 for RTBC
Comment #12
anoopsingh92No error after running phpcs

Moving it to RTBC.
Comment #13
hamedhosseini0143 commentedComment #14
hamedhosseini0143 commented