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
----------------------------------------------------------------------------------------------------------------------------

Command icon 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

Harsh panchal created an issue. See original summary.

Harsh panchal’s picture

Assigned: Harsh panchal » Unassigned
Category: Task » Bug report
Status: Active » Needs review
StatusFileSize
new12.01 KB

I have fixed this issue and providing a patch.

meeni_dhobale’s picture

Assigned: Unassigned » meeni_dhobale
Status: Needs review » Needs work

@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
----------------------------------------------------------------------

Harsh panchal’s picture

Assigned: meeni_dhobale » Unassigned

Hi @Meeni_Dhobale
dependency injection they are drupal practice issue so i will created another issue for dependences injection

anoopsingh92’s picture

Assigned: Unassigned » anoopsingh92
anoopsingh92’s picture

Hi, I have fixed pending phpcs coding standard issues. Please review this patch. Thanks

anoopsingh92’s picture

Assigned: anoopsingh92 » Unassigned
Status: Needs work » Needs review
meeni_dhobale’s picture

@anoopsingh92 Thank you for the patch. I will review it.

harivenuv’s picture

Hi 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

anoopsingh92’s picture

Hi @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.

anoopsingh92’s picture

+1 for RTBC

anoopsingh92’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new12.14 KB

No error after running phpcs
Patch #2
Moving it to RTBC.

hamedhosseini0143’s picture

Version: 1.0.x-dev » 1.0.3
Assigned: Unassigned » hamedhosseini0143
Status: Reviewed & tested by the community » Fixed
hamedhosseini0143’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.