WordPress / WordPress/WordPress-Coding-Standards
WordPress DocBlock: Period at the end of the summary
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.8k
- Forks
- 521
- Avg merge
- 5d 20h
- Merged PRs (30d)
- 1
Description
I was recently doing a review of a pull request for _s where the period was missing at the end of the summary and WPCS was not picking up on it.
The other values in the DocBlock also require a period at the end of the line.
There is an existing sniff to check for inline comments Squiz.Commenting.InlineComment.InvalidEndChar but not for function DocBlocks.
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 comparing the existing Squiz.Commenting.InlineComment.InvalidEndChar sniff with the function DocBlock rules and the linked WordPress documentation. Identify the relevant sniff tests and add coverage showing that a function DocBlock summary without a final period is reported, while a correctly punctuated summary passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100