-
Notifications
You must be signed in to change notification settings - Fork 67
Implement CS checking based on the WP_CLI_CS ruleset
#141
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
=> replace => remove quotes around placeholders: => wrap in whitelist: // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound
if ( ! defined( 'KB_IN_BYTES' ) ) {
define( 'KB_IN_BYTES', 1024 );
}
if ( ! defined( 'MB_IN_BYTES' ) ) {
define( 'MB_IN_BYTES', 1024 * KB_IN_BYTES );
}
if ( ! defined( 'GB_IN_BYTES' ) ) {
define( 'GB_IN_BYTES', 1024 * MB_IN_BYTES );
}
if ( ! defined( 'TB_IN_BYTES' ) ) {
define( 'TB_IN_BYTES', 1024 * GB_IN_BYTES );
}
// phpcs:enable(to be continued...) |
=> Unsure why we have this there, let's leave it for now. Precede with whitelist comment: => Lines 1182, 1184, 1429 - I verified these are escaped, whitelist with a preceding comment: => Line 1429 - a slightly different comment explanation: => We can't change these, wrap block in whitelist: |
Co-Authored-By: wojsmol <wojsmol@wp.pl>
Co-Authored-By: wojsmol <wojsmol@wp.pl>
Co-Authored-By: wojsmol <wojsmol@wp.pl>
Co-Authored-By: wojsmol <wojsmol@wp.pl>
Co-Authored-By: wojsmol <wojsmol@wp.pl>
Co-Authored-By: wojsmol <wojsmol@wp.pl>
Co-Authored-By: wojsmol <wojsmol@wp.pl>
Co-Authored-By: wojsmol <wojsmol@wp.pl>
Co-Authored-By: wojsmol <wojsmol@wp.pl>
Co-Authored-By: wojsmol <wojsmol@wp.pl>
Co-Authored-By: wojsmol <wojsmol@wp.pl>
Implement CS checking based on the `WP_CLI_CS` ruleset
Add a PHPCS ruleset using the new WP_CLI_CS standard.
Fixes #139
Related wp-cli/wp-cli#5179