#53004 closed feature request (wontfix)
Coding Standards: Single-Line Code Comment Format Used In Place Of Multi-Line Format.
Reported by: | rkradadiya | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.7 |
Component: | Upgrade/Install | Keywords: | has-screenshots |
Focuses: | docs, coding-standards | Cc: |
Description
Hello,
WordPress has a comment structure.
But developers have used a Single-line comment structure in a Multi-line comment in the below file.
wp-admin/update-core.php
Please use multi line comment instead of a Single.
Thanks,
Rajesh
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Hi there, thanks for the ticket!
As previously noted in comment:9:ticket:52025, there are many other instances in core of the single-line comment style being used for multi-line comments.
There is a section in the documentation standards that clarifies which format is generally recommended, but that is just a recommendation and not a strict rule.
This was previously corrected for most of inline comments in core in [47122]. I think I opted to keep comments with one or two lines in single line format, and switch comments with three or more lines to the multi-line format.
At this time, until we have a WPCS rule that forbids using this comment style for multi-line comments, I think it makes sense to keep these two-line comments as is.