[wp-meta] [Making WordPress.org] #3233: Inline comments must end in full-stops, exclamation marks, or question marks missing wp standard in doc

Making WordPress.org noreply at wordpress.org
Mon Oct 30 05:17:23 UTC 2017


#3233: Inline comments must end in full-stops,exclamation marks, or question marks
missing wp standard in doc
----------------------------+-----------------------
 Reporter:  mp518           |       Owner:
     Type:  defect          |      Status:  reopened
 Priority:  normal          |   Milestone:
Component:  Support Forums  |  Resolution:
 Keywords:  has-patch       |
----------------------------+-----------------------
Changes (by netweb):

 * status:  closed => reopened
 * resolution:  invalid =>


Comment:

 Replying to [comment:1 Otto42]:
 > The WordPress standard has no such rule.
 >
 > https://make.wordpress.org/core/handbook/best-practices/inline-
 documentation-standards/php/#5-inline-comments
 > https://make.wordpress.org/core/handbook/best-practices/inline-
 documentation-standards/php/#5-1-single-line-comments
 It does actually, the example given `// Allow plugins to filter an array.`
 includes a full-stop at the end of the line, it is also enforced by the
 [https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
 WordPress PHPCS ruleset].

 Also:

 * https://make.wordpress.org/core/handbook/best-practices/inline-
 documentation-standards/php/#1-functions-class-methods:
  * > `@param`: Note if the parameter is Optional before the description,
 '''and include a period at the end'''. The description should mention
 accepted values as well as the default. For example: Optional. This value
 does something. Accepts ‘post’, ‘term’, or empty. Default empty.
  * > `@return`: Should contain all possible return types, and a
 description for each. '''Use a period at the end'''. Note: @return void
 should not be used outside of the default bundled themes.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/3233#comment:2>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list