Problem/Motivation

some coding standard errors in comment.module file, need to fix those errors.

FILE: /Users/qed42/Documents/sample/drupal_core/core/modules/comment/comment.module
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
-------------------------------------------------------------------------------------------------------------------------------------
  53 | ERROR   | [ ] If the line declaring an array spans longer than 80 characters, each element should be broken into its own line
 192 | WARNING | [x] There must be no blank line following an inline comment
 442 | ERROR   | [ ] If the line declaring an array spans longer than 80 characters, each element should be broken into its own line
 556 | ERROR   | [ ] Type hint "array" missing for $variables
-------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------

Comments

meghasharma created an issue. See original summary.

meghasharma’s picture

Assigned: Unassigned » meghasharma
meghasharma’s picture

Title: Fix coding standard error in comment.module » Fix coding standard errors in comment.module
Issue summary: View changes
meghasharma’s picture

Assigned: meghasharma » Unassigned
Status: Active » Needs review
StatusFileSize
new4.8 KB
meena.bisht’s picture

Assigned: Unassigned » meena.bisht
meena.bisht’s picture

Assigned: meena.bisht » Unassigned
Status: Needs review » Needs work
StatusFileSize
new503.36 KB
new284.07 KB

While reviewing I found some issues are yet to be solved . Adding Befor and after patch is applied screenshot . Putting it back to needs work .

meena.bisht’s picture

Assigned: Unassigned » meena.bisht
alexpott’s picture

Thank you for your work on cleaning up Drupal core's code style!

In order to fix core coding standards in a maintainable way, all our coding standards issues should be done on a per-rule basis across all of core, rather than fixing standards in individual modules or files. We should also separate fixes where we need to write new documentation from fixes where we need to correct existing standards. This all should be done as part of #2571965: [meta] Fix PHP coding standards in core, stage 1. A good place to start is the child issues of #2572645: [Meta] Fix 'Drupal.Commenting.FunctionComment' coding standard.

For background information on why we usually will not commit coding standards fixes that aren't scoped in that way, see the core issue scope guidelines, especially the note about coding standards cleanups. That document also includes numerous suggestions for scoping issues including documentation coding standards cleanups.

Contributing to the overall plan above will help ensure that your fixes for core's coding standards remain in core the long term.

This should be closed as a duplicate.

meena.bisht’s picture

Assigned: meena.bisht » Unassigned

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

NitinLama’s picture

we can close this issue as per @alexpott.

quietone’s picture

Category: Bug report » Task
Status: Needs work » Closed (duplicate)
Issue tags: +Bug Smash Initiative
Related issues: +#2571965: [meta] Fix PHP coding standards in core, stage 1

Closing this as a duplicate based on the comment by alexpott in #8. Also, changing to Task.