Skip to:
Content

bbPress.org

Opened 21 months ago

Closed 8 months ago

Last modified 8 months ago

#3613 closed regression (fixed)

PHPCS Resurrection + WordPress.PHP.YodaConditions Sorted

Reported by: SirLouen Owned by: johnjamesjacoby
Priority: highest omg sweet tea Milestone: 2.7
Component: Tools - Build Version: trunk
Severity: normal 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 21 months ago.
Patch with PHPCS Dist file resurrection + All the YodaConditions Sorted

Download all attachments as: .zip

Change History (5)

@SirLouen
21 months ago

Patch with PHPCS Dist file resurrection + All the YodaConditions Sorted

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


21 months ago
#1

#2 @johnjamesjacoby
8 months ago

  • Keywords commit added
  • Milestone Awaiting Review2.7
  • Owner set to johnjamesjacoby
  • Status newassigned

#3 @johnjamesjacoby
8 months ago

  • Resolutionfixed
  • Status assignedclosed

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.