Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vipul tulse created an issue. See original summary.

vipul tulse’s picture

Coding standard issue For d8 version:

vipul tulse’s picture

Assigned: Unassigned » vipul tulse

Working on the coding standard fixing, will attach the issue txt file soon

vipul tulse’s picture

Hello @johnv,

Is there any way that I can review and commit the changes file by file because don't want to add too many patches.

Please guide me.

johnv’s picture

Issue summary: View changes
vipul tulse’s picture

Currently working on fixing this coding standard issues using phpcs/phpcbf with Drupal coder with coding standard "Drupal" and "DrupalPractice".

Attached files is the list of issues found in workflow.module file

vipul tulse’s picture

Status: Active » Needs review
FileSize
22.16 KB

Hello @johnv

Attached patch contains bugs resolved for Drupal, DrupalPractice.

phpcbf --standard=Drupal workflow.module

phpcbf --standard=DrupalPractice workflow.module

Remaining Bugs list is, need your help to remove the @params from hook comment

FILE: /var/www/html/drupalcontrib/modules/contrib/workflow/workflow.module
---------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 12 WARNINGS AFFECTING 18 LINES
---------------------------------------------------------------------------------------------------------------------
45 | WARNING | Hook implementations should not duplicate @param documentation
48 | WARNING | Hook implementations should not duplicate @return documentation
86 | WARNING | Hook implementations should not duplicate @param documentation
88 | WARNING | Hook implementations should not duplicate @param documentation
90 | WARNING | Hook implementations should not duplicate @param documentation
102 | WARNING | Hook implementations should not duplicate @param documentation
117 | WARNING | Hook implementations should not duplicate @param documentation
127 | WARNING | Hook implementations should not duplicate @param documentation
139 | WARNING | Hook implementations should not duplicate @param documentation
151 | WARNING | Line exceeds 80 characters; contains 90 characters
153 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
173 | WARNING | Hook implementations should not duplicate @param documentation
239 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
258 | WARNING | Line exceeds 80 characters; contains 86 characters
332 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
408 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
438 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
483 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
---------------------------------------------------------------------------------------------------------------------

Status: Needs review » Needs work

The last submitted patch, 7: Drupal_Coding_Standard_Fixing-3022421-7.patch, failed testing. View results

  • johnv committed 77445db on 8.x-1.x authored by vipul tulse
    Issue #3022421 by vipul tulse: Drupal Coding Standard Fixing
    
johnv’s picture

Thanks. this file is committed.
I changed some things in comments,
And you removed some t()calls.

johnv’s picture

Issue summary: View changes
johnv’s picture

Status: Needs work » Active

Can you run the test again, to have new, actual line numbers?

vipul tulse’s picture

Hello @johnv

Ran the test again and attached is the list of the issue still exist in the .module file

you removed some t()calls?

+ ANS : To remove below drupal coding standard issue

377 | WARNING | [ ] Only string literals should be passed to t() where possible

If removing of the t() casing any issue then it's fine to keep them otherwise good to remove

Can I proceed further to fix the remaining issue? or start working on another file.

vipul tulse’s picture

Working on the .install file coding standard review, please ignore this patch.

johnv’s picture

Issue summary: View changes

  • johnv committed 19030d5 on 8.x-1.x
    Issue #3022421 by vipul tulse, johnv: Fix Coding Standard - src/Entity
    
johnv’s picture

Status: Active » Needs review
FileSize
39.76 KB

lots of code-sniffer changes.

Status: Needs review » Needs work

The last submitted patch, 17: workflow-3022421-17-codingstandards.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

johnv’s picture

Status: Needs work » Needs review
FileSize
62.93 KB

Status: Needs review » Needs work

The last submitted patch, 19: workflow-3022421-19-codingstandards.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • johnv committed e15a53a on 8.x-1.x
    Issue #3022421: Drupal Coding Standard - codesniffer.fixes
    
johnv’s picture

Assigned: vipul tulse » Unassigned
Status: Needs work » Active

Above patch should be enough. Have not implemented all remarks, especially no the inline comments and indenting of commented code.
Leaving this issue open for future work.

  • johnv committed 6508fb1 on 8.x-1.x
    Issue #3022421: Drupal Coding Standard
    

  • johnv committed d75c801 on 8.x-1.x
    Issue #3022421: Drupal Coding Standard - src/Entity/WorkflowManager.php
    

  • johnv committed a75402d on 8.x-1.x
    Issue #3022421: Drupal Coding Standard - WorkflowTransitionRevertForm....

  • johnv committed 6eec0ca on 8.x-1.x
    Issue #3022421: Drupal Coding Standard
    
johnv’s picture

Title: Drupal Coding Standard Fixing » Apply Drupal Coding Standards

  • johnv committed db85c6d on 8.x-1.x
    Issue #3022421: Apply Drupal Coding Standards - Inline @var declarations
    

  • johnv committed 02991ab on 8.x-1.x
    Issue #3022421: Apply Drupal Coding Standards - Inline @todo...

  • johnv committed 586a70f on 8.x-1.x
    Issue #3022421: Apply Drupal Coding Standards - indents etc.
    

  • johnv committed 88b1beb on 8.x-1.x
    Issue #3022421: Apply Drupal Coding Standards - indents etc.
    

  • johnv committed ae76011 on 8.x-1.x
    Issue #3022421: Apply Drupal Coding Standards
    

  • johnv committed 81ca63d on 8.x-1.x
    Issue #3022421: Apply Drupal Coding Standards
    

  • johnv committed 7fa1209 on 8.x-1.x
    Issue #3022421: Apply Drupal Coding Standards - WorkflowTypeForm t()
    

  • johnv committed bcb533b on 8.x-1.x
    Issue #3022421: Apply Drupal Coding Standards -...

  • johnv committed 60060b3 on 8.x-1.x
    Issue #3022421: Apply Drupal Coding Standards - create/__construct order
    

  • johnv committed 9ebc6a0 on 8.x-1.x
    Issue #3022421: Apply Drupal Coding Standards
    

  • johnv committed 6cad5fe on 8.x-1.x
    Issue #3022421: Apply Drupal Coding Standards
    
johnv’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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