Problem/Motivation

There are 9 violations of the Drupal.Commenting.DocComment.TagsNotGrouped rule in Examples.

We should fix them.

Proposed resolution

See the parent issue for instructions on how to install phpcs: #2176147: [meta] Coding standards review for D8 Examples

  • Add the Drupal.Commenting.DocComment.TagsNotGrouped sniff as a rule to phpcs.xml.dist.
  • Run phpcfb to make automated changes.
  • Review the changes made by phpcbf.
  • Run phpcs in order to verify that the error no longer exists.
  • Submit a patch with all changed files, remembering to include the changes to phpcs.xml.dist in the patch.

To Review

To review this issue you should:

How to run phpcs?

If you've installed phpcs as per the instructions in the meta, you can then change directories into the examples module and use .. to execute the phpcs executable you just installed. Like this:

$ pwd
/PATH/TO/drupal/modules/examples

$ ../../vendor/bin/phpcs -p -s

[ ...phpcs results print out... ]

Comments

Mile23 created an issue. See original summary.

mile23’s picture

Issue summary: View changes
mile23’s picture

Issue tags: +Novice
das.gautam’s picture

Assigned: Unassigned » das.gautam
das.gautam’s picture

Assigned: das.gautam » Unassigned
minakshiPh’s picture

Status: Active » Needs review
StatusFileSize
new7.42 KB

Added the patch with fix.

Kindly review.
Thanks!

amit.drupal’s picture

StatusFileSize
new7.83 KB
new1.66 KB

Review #6 patch its working but found some basic coding stander spacing issues.
i do't know my patch is helpful or not.

mile23’s picture

Status: Needs review » Needs work

Thanks for working on this.

This issue should *only* change docblock comments to fix one coding standards error: Drupal.Commenting.DocComment.TagsNotGrouped

There are instructions for how to do this in the issue summary, and how to install the tools in the meta issue: #2176147: [meta] Coding standards review for D8 Examples

Also: We need to keep the @code tags, and not change the way @link tags work.

Basically, we want a reproducible fix for the Drupal.Commenting.DocComment.TagsNotGrouped error using the PHP CodeSniffer tool.

mile23’s picture

Status: Needs work » Postponed
avpaderno’s picture

Version: 8.x-1.x-dev » 4.0.x-dev
Component: Other » Code
Issue tags: -Novice
avpaderno’s picture

Status: Postponed » Closed (outdated)

Projects hosted on drupal.org now use GitLab CI for testing, which runs a phpcs job with its own phpcs.xml.dist file. The PHP_CodeSniffer warnings/errors have been already fixed.

I am closing this issue as outdated.

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.

avpaderno’s picture

By reading #2502837: Multiple code snippets, todos, and links are allowed in file doc blocks, I gather the error message quoted in the issue summary is no longer returned by PHP_CodeSniffer, with the rules used by Drupal core.