WordPress / WordPress/WordPress-Coding-Standards
Generic.Commenting.DocComment.MissingShort is too broad
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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