Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update phpcs.xml to match new WPCS rules #5836

Merged
merged 1 commit into from Sep 13, 2023

Conversation

mrsdizzie
Copy link
Contributor

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 merged commit 8114cb4 into wp-cli:main Sep 13, 2023
32 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants