-
Notifications
You must be signed in to change notification settings - Fork 846
PHPCS: Update to a newer snapshot of WordPress-Coding-Standards #28199
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
Conversation
In packages/autoloader we can just ignore the sniff entirely. None of the code there runs inside WordPress, so we don't need to use WordPress's alternative functions. The same goes for the tests in packages/my-jetpack. The `Helper_Script_Manager` classes in packages/backup and packages/transport-helper, on the other hand, can make more consistent use of WordPress's `WP_Filesystem` class, instead of mixing it with direct filesystem access.
* Drop MediaWiki.Usage.DirUsage, WPCS brings in Modernize.FunctionCalls.Dirname which checks the same and more. * Configure `WordPress.WP.Capabilities` * Ignore new Generic.CodeAnalysis.UnusedFunctionParameter, we already use VariableAnalysis.CodeAnalysis.VariableAnalysis that checks more stuff. * Ignore new Universal.NamingConventions.NoReservedKeywordParameterNames, not really useful until we can use PHP 8.
….SeparateFunctionsFromOO.Mixed
Fixed: * Universal.Arrays.DuplicateArrayKey * WordPress.WP.AlternativeFunctions.unlink_unlink * WordPress.WP.Capabilities.RoleFound * WordPress.WP.ClassNameCase.Incorrect Ignored: * Universal.CodeAnalysis.ConstructorDestructorReturn - 1 false positive * WordPress.DB.DirectDatabaseQuery - "db call ok" comment is no longer recognized. * WordPress.WP.AlternativeFunctions.file_system_operations_is_writeable - * WordPress.WP.AlternativeFunctions.file_system_operations_mkdir - * WordPress.WP.AlternativeFunctions.file_system_operations_touch - Matching nearby ignores for fopen etc. * WordPress.WP.Capabilities.Unknown - Capabilities from other plugins. Renamed existing ignores: * WordPress.PHP.IniSet.display_errors_Disallowed * WordPress.WP.AlternativeFunctions.file_system_operations_fopen * WordPress.WP.AlternativeFunctions.file_system_operations_fread * WordPress.WP.AlternativeFunctions.file_system_operations_fwrite * WordPress.WP.AlternativeFunctions.file_system_operations_fclose * WordPress.WP.EnqueuedResourceParameters.MissingVersion
|
Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run |
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
Debug Helper plugin:
Boost plugin:
Protect plugin:
|
|
Note, don't actually merge this into #28198. It's just set up that way because that's needed to fix some additional things before this can be merged, and doing it this way lets me see if CI flags anything I missed while dividing up the PRs. |
Changes proposed in this Pull Request:
Following up on #28099, this updates to a newer snapshot of the WordPress-Coding-Standards package to resolve the issues without having to maintain extraneous deps.
Changes to our jetpack-codesniffer package:
WordPress.WP.CapabilitiesNew sniffs fixed:
New sniffs ignored:
Also some existing sniffs were renamed:
Other information:
Jetpack product discussion
pdWQjU-bv-p2
Does this pull request change what data or activity we track or use?
No
Testing instructions: