WordPress / WordPress/WordPress-Coding-Standards

Generic.Commenting.DocComment.MissingShort is too broad

Open
#403 9 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Docs Type: Bug
Dominant language
PHP
Stars
2.8k
Forks
521
Avg merge
5d 20h
Merged PRs (30d)
1

Description

From a stab at making existing plugin adhere to new WordPress-Docs ruleset, the sniff enforcing short descriptions in doc blocks is overly broad.

That would make sense to me if limited to function/property descriptions.

However it catches multiple other kinds of blocks:

  • file headers (where description can be redundant)
  • /** @var ... blocks of variables and properties documentation
  • /** @todo ... and other arbitrary blocks not tied to specific code elements

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Generic.Commenting.DocComment.MissingShort sniff and the tests covering its doc-block handling. Check how it treats file headers, @var blocks, @todo blocks, and other blocks, then verify that short descriptions are required only for function and property descriptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.