[wp-trac] [WordPress Trac] #53004: Coding Standards: Single-Line Code Comment Format Used In Place Of Multi-Line Format.
WordPress Trac
noreply at wordpress.org
Fri Apr 9 11:12:36 UTC 2021
#53004: Coding Standards: Single-Line Code Comment Format Used In Place Of Multi-
Line Format.
-----------------------------+-------------------------------------
Reporter: rkradadiya | Owner: (none)
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Upgrade/Install | Version: 5.7
Severity: normal | Resolution: wontfix
Keywords: has-screenshots | Focuses: docs, coding-standards
-----------------------------+-------------------------------------
Changes (by SergeyBiryukov):
* keywords: has-screenshots dev-feedback => has-screenshots
* resolution: => wontfix
* status: new => closed
* component: Users => Upgrade/Install
* milestone: Awaiting Review =>
Comment:
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 [https://make.wordpress.org/core/handbook/best-practices
/inline-documentation-standards/php/#5-inline-comments 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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53004#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list