Skip to content

Update phpcs.xml to match new WPCS rules#5836

Merged
danielbachhuber merged 1 commit intowp-cli:mainfrom
mrsdizzie:phpcs-update
Sep 13, 2023
Merged

Update phpcs.xml to match new WPCS rules#5836
danielbachhuber merged 1 commit intowp-cli:mainfrom
mrsdizzie:phpcs-update

Conversation

@mrsdizzie
Copy link
Member

It looks like WordPress.CodeAnalysis.AssignmentInCondition.Found has been renamed upstream and is now Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition

I don't believe this repo actually does an assignment inside of a while condition at the moment -- which is why there weren't any test failures when updating to WPCS 3.0.

I had one of these in a local wp-cli project and when searching for the origin of that exclude I realized that it had been copied from the phpcs.xml file in this repo which I used as a starting point.

While I was here I also removed the PSR2 rule below it based on the comment suggesting it should be removed once PHPCS is above 3.5.0 (it is).

Rename WordPress.CodeAnalysis.AssignmentInCondition.Found to Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition based on upstream changes.

Remove PSR2 rule based on comment now that PHPCS has been updated.
@mrsdizzie mrsdizzie requested a review from a team as a code owner September 12, 2023 15:16
Copy link
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mrsdizzie !

@danielbachhuber danielbachhuber added this to the 2.9.0 milestone Sep 13, 2023
@danielbachhuber danielbachhuber added scope:documentation Related to documentation scope:testing Related to testing and removed scope:documentation Related to documentation labels Sep 13, 2023
@danielbachhuber danielbachhuber merged commit 8114cb4 into wp-cli:main Sep 13, 2023
@mrsdizzie mrsdizzie deleted the phpcs-update branch September 13, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants