WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#44590 closed defect (bug) (fixed)

Remove "// WPCS:" comments

Reported by: pento Owned by: pento
Milestone: 4.9.8 Priority: low
Severity: trivial Version: 4.9.6
Component: Privacy Keywords: good-first-bug has-patch commit fixed-major
Focuses: Cc:

Description

[42967] introduced some comments saying // WPCS: input var ok., which I guess someone's IDE decided to write to the file, instead of displaying in some ephemeral way.

Attachments (1)

44590.patch (2.6 KB) - added by burhandodhy 3 months ago.
" WPCS: input var ok." Removed

Download all attachments as: .zip

Change History (8)

@burhandodhy
3 months ago

" WPCS: input var ok." Removed

#1 @pento
3 months ago

  • Keywords has-patch commit added; needs-patch removed
  • Milestone changed from Future Release to 4.9.8

Awesome, thanks for the patch, @burhandodhy!

This is ready to commit and backport.

#2 @pento
3 months ago

  • Owner set to pento
  • Resolution set to fixed
  • Status changed from new to closed

In 43465:

Privacy: Remove some unnecessary code comments.

[42967] introduced some WPCS-related comments, probably accidentally saved by an IDE.

Props burhandodhy.
Fixes #44590.

#3 @pento
3 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for backport.

#4 @SergeyBiryukov
3 months ago

Some of the changes are already backported via [43479], backporting the rest now.

#5 @SergeyBiryukov
3 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 43485:

Privacy: Remove some unnecessary code comments.

[42967] introduced some WPCS-related comments, probably accidentally saved by an IDE.

Props burhandodhy.
Merges [43465] to the 4.9 branch.
Fixes #44590.

This ticket was mentioned in Slack in #core-coding-standards by garyj. View the logs.


3 months ago

#7 @jrf
3 months ago

I suspect these crept in when someone tested the patch against the WPCS WordPress ruleset before submitting it.

For core patches, the phpcs.xml.dist ruleset in the WP root directory should be used instead. This custom ruleset is based on the WPCS WordPress-Core ruleset, which, for on the fly patch CS testing, could in most cases be used interchangably.

The WordPress-Core ruleset does not contain the sniffs for which these whitelist comments are applicable.

Note: See TracTickets for help on using tickets.