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

elaman created an issue. See original summary.

jyoti.singh’s picture

Patch for fixing the coding standards issue with code sniffer.

elaman’s picture

StatusFileSize
new34.63 KB

@jyoti.singh

Thank you for providing this patch, however there are still some errors. Attaching the output.

jyoti.singh’s picture

@elaman : Thank you for reviewing the patch.Uploading the new patch. I have ignore README file issues as I think we should not follow 80 characters limit for the readme file.Please let me your feedback on this.

Akanksha92’s picture

@jyoti.singh the patch applies successfully. Please find the attached screenshot for the same.

jyoti.singh’s picture

Thank you @Akanksha92 for confirmation

Swapnil_Kotwal’s picture

@Jyoti Singh (jyoti.singh)... I found some coding standards in your patch. I have hereby fixed those except those with character limit. Kindly review.

Swapnil_Kotwal’s picture

Status: Active » Needs review
jyoti.singh’s picture

Can you please provide an interdiff @Swapnil_Kotwal.That would really help me

Swapnil_Kotwal’s picture

StatusFileSize
new846.92 KB

@Jyoti Singh (jyoti.singh). I have attached the txt file

elaman’s picture

Status: Needs review » Needs work

@jyoti.singh, @Swapnil_Kotwal If we exclude README.md file (which I think we shouldn't), there still issues popping up:

FILE: ~/react_comments/js/src/src/index.css
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] Additional whitespace found at start of file
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: ~/react_comments/js/src/src/components/CommentBox.css
-------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------
146 | ERROR | Class definition is empty
-------------------------------------------------------------------------------

FILE: ~/react_comments/src/Plugin/views/field/ReactCommentsStatus.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
29 | WARNING | Possible useless method overriding detected
36 | WARNING | Possible useless method overriding detected
--------------------------------------------------------------------------------

FILE: ~/react_comments/react_comments.module
-------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
-------------------------------------------------------------------------------------
12 | WARNING | Global constants should not be used, move it to a class or interface
13 | WARNING | Global constants should not be used, move it to a class or interface
14 | WARNING | Global constants should not be used, move it to a class or interface
15 | WARNING | Global constants should not be used, move it to a class or interface
-------------------------------------------------------------------------------------

Also, before we commit this, I think we need to write some tests.

anisha.challa’s picture

Assigned: Unassigned » anisha.challa
anisha.challa’s picture

I am getting the below error when I am trying to apply the patch react_comments-coding-standards-3043979-7.patch:

$ git apply react_comments-coding-standards-3043979-7.patch
warning: js/src/build.php has type 100644, expected 100755
error: patch failed: js/src/src/components/Comment.css:1
error: js/src/src/components/Comment.css: patch does not apply
error: patch failed: js/src/src/components/CommentBox.css:1
error: js/src/src/components/CommentBox.css: patch does not apply
react_comments-coding-standards-3043979-7.patch:569: new blank line at EOF.
+
error: patch failed: react_comments.module:18
error: react_comments.module: patch does not apply
error: patch failed: src/Model/Comment.php:59
error: src/Model/Comment.php: patch does not apply
error: patch failed: src/Model/CommentBase.php:4
error: src/Model/CommentBase.php: patch does not apply
error: patch failed: src/Model/User.php:40
error: src/Model/User.php: patch does not apply
error: patch failed: src/Model/UserBase.php:12
error: src/Model/UserBase.php: patch does not apply
error: patch failed: src/Plugin/rest/resource/Comment.php:104
error: src/Plugin/rest/resource/Comment.php: patch does not apply

anisha.challa’s picture

Assigned: anisha.challa » Unassigned
bharath-kondeti’s picture

StatusFileSize
new51.74 KB

Hi,

I could not apply the existing patch. I have worked on my own patch. Please review the same.

bharath-kondeti’s picture

Assigned: Unassigned » bharath-kondeti
bharath-kondeti’s picture

Status: Needs work » Needs review
adeelnawaz’s picture

StatusFileSize
new1.79 KB

I have fixed some error waring according to a coding standard.

drupal.ninja03’s picture

Assigned: bharath-kondeti » Unassigned
StatusFileSize
new64.72 KB
new132.49 KB

Hi,

Found some more warnings on running code sniffer against the files.

nitesh624’s picture

Assigned: Unassigned » nitesh624
nitesh624’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
StatusFileSize
new39.38 KB

Last patch #19 didnot apply, needs reroll

patch_failed

nikitagupta’s picture

Assigned: nitesh624 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new64.44 KB

made the changes for coding standards.

nitesh624’s picture

Assigned: Unassigned » nitesh624

I will review the last patch

nitesh624’s picture

Status: Needs review » Needs work

Still having warning after applying patch #22

nitesh624’s picture

nitesh624’s picture

StatusFileSize
new107.73 KB
new69.14 KB
nitesh624’s picture

Assigned: nitesh624 » Unassigned
Status: Needs work » Needs review
nmatja’s picture

Assigned: Unassigned » nmatja
nmatja’s picture

Status: Needs review » Reviewed & tested by the community

The coding standards are looking great. A minor comment is only on the short comments, which should describe what the class should do.

nmatja’s picture

Assigned: nmatja » Unassigned
avpaderno’s picture

Title: Coding standards » Fix the issues reported by phpcs
Issue tags: -DrupalCodingStandard, -Coding standard issue, -Needs reroll
avpaderno’s picture

Category: Bug report » Task
minnur’s picture

Status: Reviewed & tested by the community » Needs work

Latest release needs more work.

apaderno changed the visibility of the branch 3043979-fix-the-issues to hidden.

avpaderno’s picture

Issue summary: View changes
avpaderno’s picture

Issue tags: -Novice
avpaderno’s picture

minnur’s picture

Version: 8.x-1.x-dev » 2.0.1-beta5
Status: Needs work » Fixed

Thanks for working on this. I had to refactor and redo phpcs/phpstan warning fixes.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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