Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#42946 closed defect (bug) (wontfix)

Missing a space before inline comment text

Reported by: chetan200891 Owned by:
Priority: normal Milestone:
Component: General Version: 5.1
Severity: normal Keywords:
Cc: Focuses: coding-standards

Description

PHPCS gives an error.

'No space found before comment text;

So It needs a space before starting inline comment.

Attachments (2)

42946.diff (630 bytes ) - added by chetan200891 9 years ago.
Created patch.
42946.1.diff (631 bytes ) - added by chetan200891 9 years ago.
Updated patch. Added period at the end.

Download all attachments as: .zip

Change History (7)

@chetan200891
9 years ago

Created patch.

#1 @chetan200891
9 years ago

  • Keywords has-patch added

#2 @jrf
9 years ago

Thanks. Looking at the patch, the comment actually also needs a period at the end of the phrase.

@chetan200891
9 years ago

Updated patch. Added period at the end.

#3 follow-up: @chetan200891
9 years ago

@jrf

Thanks for reply and suggestion. I have updated patch. 42946.1.diff

Apart from that, I have another question. There are still many inline comments in other files which gives error for "Inline comments must end in full-stops, exclamation marks, or question marks"

How are we going to fix that? Any planning for it?

Last edited 9 years ago by chetan200891 (previous) (diff)

#4 in reply to: ↑ 3 @netweb
9 years ago

  • Keywords has-patch removed
  • Milestone Awaiting Review
  • Resolutionwontfix
  • Status newclosed

Closing this as SimplePie is an external 3rd party library that is included in WordPress and adheres to its own coding standards. Here's the exclusion: https://core.trac.wordpress.org/browser/trunk/phpcs.xml.dist#L33

Replying to chetan200891:

Apart from that, I have another question. There are still many inline comments in other files which gives error for "Inline comments must end in full-stops, exclamation marks, or question marks"

How are we going to fix that? Any planning for it?

Are these being reported by PHPCS using WordPress's phpcs.xml.dist file?

#5 @jrf
9 years ago

Are these being reported by PHPCS using WordPress's phpcs.xml.dist file?

They wouldn't be (yet) as the WP-Docs ruleset is not (yet) included, quite apart from that ruleset not (yet) being feature complete.

Note: See TracTickets for help on using tickets.