Make WordPress Core

Opened 5 years ago

Closed 6 months ago

Last modified 6 months ago

#43761 closed defect (bug) (fixed)

CS: Fix violations for wp-admin/install-helper.php

Reported by: jipmoors's profile jipmoors Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.2 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch commit
Focuses: coding-standards Cc:

Description

Working on this currently, during WordCamp London contributor day.

Attachments (1)

43761-fix-coding-standards.patch (6.2 KB) - added by jipmoors 5 years ago.

Download all attachments as: .zip

Change History (11)

#1 @jipmoors
5 years ago

  • Keywords has-patch added; needs-patch removed

#2 @SergeyBiryukov
3 years ago

  • Component changed from General to Upgrade/Install

This ticket was mentioned in PR #3478 on WordPress/wordpress-develop by @costdev.


8 months ago
#3

Refreshes 43761-fix-coding-standards.patch against trunk with some minor updates.

---

This adds inline comments instructing PHPCS to ignore some lines for database queries and property naming in wp-admin/install-helper.php.

An explanation is provided with each instruction.

The sniffs in question are:

  • WordPress.DB.PreparedSQL.NotPrepared - Ignored as needed.
  • WordPress.DB.PreparedSQL.InterpolatedNotPrepared - Ignored as needed.
  • WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase - Temporarily disabled, then re-enabled.

#4 @costdev
8 months ago

  • Keywords dev-feedback added

PR 3478 refreshes 43761-fix-coding-standards.patch against trunk with some changes to update sniff names and change the last batch to a temporarily disable/re-enable.

Pinging @jrf for feedback on whether these changes are appropriate.

#5 @jrf
8 months ago

FYI: I reviewed the PR and @costdev and me discussed my feedback in a call.

#6 @costdev
8 months ago

  • Keywords commit added; dev-feedback removed
  • Milestone changed from Awaiting Review to 6.2

I have updated the PR with changes after feedback from @jrf. Thanks Juliette!

Adding for commit consideration.

#7 @SergeyBiryukov
7 months ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

@SergeyBiryukov commented on PR #3478:


7 months ago
#8

Thanks for the PR! This looks good to me, I just had a question about one of the changes.

#9 @SergeyBiryukov
6 months ago

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

In 54858:

Coding Standards: Fix WPCS issues in wp-admin/install-helper.php.

This commit adds inline comments instructing PHPCS to ignore some lines for database queries. An explanation is provided with each instruction.

This resolves a few WPCS warnings along the lines of:

Use placeholders and $wpdb->prepare(); found interpolated variable $table_name at "DESC $table_name"

Follow-up to [236], [265], [5778].

Props jipmoors, costdev, jrf, SergeyBiryukov.
Fixes #43761.

@SergeyBiryukov commented on PR #3478:


6 months ago
#10

Thanks for the PR! Merged in r54858.

Note: See TracTickets for help on using tickets.