Skip to:
Content

bbPress.org

Opened 15 months ago

Closed 3 months ago

Last modified 3 months ago

#3613 closed regression (fixed)

PHPCS Resurrection + WordPress.PHP.YodaConditions Sorted

Reported by: sirlouen's profile SirLouen Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.7 Priority: highest omg sweet tea
Severity: normal Version: trunk
Component: Tools - Build Keywords: has-patch commit
Cc:

Description

The thing is that executing a lint via phpcs with phpcs.xml.dist was throwing a high number of errors.

So basically, I've cleaned up the file, reorganized all the excluded modules, removed the conflicting ones, modified some composer.json packages to update to the latest versions, and then it started throwing some information.

From there, I've chosen one exclusion at random, in this case WordPress.PHP.YodaConditions and I've sorted all the notices all over the plugin to have this satisfied.

I've tripled checked everything but still, one extra eye is never too much

I'm expecting to keep sorting at least all WordPress.* conditions in the near future, so it would be great to have this integrated in trunk as soon as possible (because it will be a pain having to extract and integrate patches from trunk without this basic requirements sorted, and having to be applied by myself every trunk fresh pull). Likewise, I'm prioritizing this because I don't really know the WordPress Code Standards and I need some code linting by default, so I'm adding special priority.

Attachments (1)

phpcs-resurrect.patch (57.1 KB) - added by SirLouen 15 months ago.
Patch with PHPCS Dist file resurrection + All the YodaConditions Sorted

Download all attachments as: .zip

Change History (5)

@SirLouen
15 months ago

Patch with PHPCS Dist file resurrection + All the YodaConditions Sorted

This ticket was mentioned in PR #23 on bbpress/bbPress by @SirLouen.


15 months ago
#1

#2 @johnjamesjacoby
3 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 2.7
  • Owner set to johnjamesjacoby
  • Status changed from new to assigned

#3 @johnjamesjacoby
3 months ago

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

In 7352:

Tools - Build: Clean-up PHPCS, and enforce Yoda conditionals.

This commit includes changes to various PHP files, Composer requirements, and PHPCS config, to confirm that the WordPress.PHP.YodaConditions code sniff passes.

Props sirlouen.

In trunk, for 2.7.

Fixes #3613.

Note: See TracTickets for help on using tickets.