Changeset 56695
- Timestamp:
- 09/26/2023 12:24:43 AM (17 months ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/composer.json
r56687 r56695 17 17 }, 18 18 "require-dev": { 19 "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", 20 "squizlabs/php_codesniffer": "3.6.0", 21 "wp-coding-standards/wpcs": "~2.3.0", 19 "squizlabs/php_codesniffer": "3.7.2", 20 "wp-coding-standards/wpcs": "~3.0.0", 22 21 "phpcompatibility/phpcompatibility-wp": "~2.1.3", 23 22 "yoast/phpunit-polyfills": "^1.1.0" -
trunk/phpcs.xml.dist
r56669 r56695 16 16 <arg name="cache" value=".cache/phpcs.json"/> 17 17 18 <!-- Set the memory limit to 256M.18 <!-- Set the memory limit to 512M. 19 19 For most standard PHP configurations, this means the memory limit will temporarily be raised. 20 20 Ref: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#specifying-phpini-settings 21 21 --> 22 <ini name="memory_limit" value=" 256M"/>22 <ini name="memory_limit" value="512M"/> 23 23 24 24 <!-- Strip the filepaths down to the relevant bit. --> … … 114 114 115 115 <rule ref="WordPress-Core"/> 116 <rule ref="WordPress.CodeAnalysis.EmptyStatement"/>117 118 <!-- Enforce no parenthesis for language constructs, and only one space immediately after.119 Including this rule is temporary until it is moved from the WordPress-Extra ruleset to120 the WordPress-Core ruleset upstream.121 -->122 <rule ref="PEAR.Files.IncludingFile.BracketsNotRequired">123 <type>warning</type>124 </rule>125 <rule ref="PEAR.Files.IncludingFile.UseRequire">126 <type>warning</type>127 </rule>128 <rule ref="PEAR.Files.IncludingFile.UseRequireOnce">129 <type>warning</type>130 </rule>131 <rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>132 116 133 117 … … 139 123 140 124 <!-- These rules are being set as warnings instead of errors, so we can error check the entire codebase. --> 125 <rule ref="Generic.Files.OneObjectStructurePerFile.MultipleFound"> 126 <type>warning</type> 127 <!-- Exclude the unit tests as no warnings are allowed there. Note: these issues should be fixed and the exclude removed! --> 128 <exclude-pattern>/tests/phpunit/*</exclude-pattern> 129 </rule> 141 130 <rule ref="WordPress.DB.PreparedSQL.InterpolatedNotPrepared"> 142 131 <type>warning</type> … … 154 143 <rule ref="WordPress.NamingConventions.ValidVariableName"> 155 144 <properties> 156 <property name=" customPropertiesWhitelist" type="array">145 <property name="allowed_custom_properties" type="array"> 157 146 <!-- From database structure queries. --> 158 147 <element value="Collation"/> … … 210 199 <rule ref="WordPress.PHP.NoSilencedErrors"> 211 200 <properties> 212 <property name="custom _whitelist" type="array">201 <property name="customAllowedFunctionsList" type="array"> 213 202 <element value="ssh2_connect"/> 214 203 <element value="ssh2_auth_password"/> … … 240 229 --> 241 230 231 <!-- Assignments in while conditions are a valid method of looping over iterables. --> 232 <rule ref="Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition"> 233 <exclude-pattern>*</exclude-pattern> 234 </rule> 235 242 236 <!-- Exclude checking of line endings when reporting errors, but fix them when running phpcbf. 243 237 Git and SVN manage these pretty well cross-platform as "native". … … 253 247 <exclude-pattern>/wp-config-sample\.php</exclude-pattern> 254 248 <exclude-pattern>/wp-tests-config\.php</exclude-pattern> 249 <exclude-pattern>/wp-tests-config-sample\.php</exclude-pattern> 250 </rule> 251 252 <!-- Exclude sample config from modernization to prevent breaking CI workflows based on WP-CLI scaffold. 253 See: https://core.trac.wordpress.org/ticket/48082#comment:16 --> 254 <rule ref="Modernize.FunctionCalls.Dirname.FileConstant"> 255 255 <exclude-pattern>/wp-tests-config-sample\.php</exclude-pattern> 256 256 </rule> … … 275 275 </rule> 276 276 277 <!-- Assignments in while conditions are a valid method of looping over iterables. --> 278 <rule ref="WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition"> 279 <exclude-pattern>*</exclude-pattern> 277 <!-- Temporarily ignore this sniff for block files until the changes from upstream make it into core. 278 This can be removed once the block-library package is updated for WP 6.4. --> 279 <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction"> 280 <exclude-pattern>/src/wp-includes/blocks/*</exclude-pattern> 280 281 </rule> 281 282 -
trunk/src/wp-admin/includes/class-wp-site-health-auto-updates.php
r56559 r56695 229 229 foreach ( $vcs_dirs as $vcs_dir ) { 230 230 foreach ( $check_dirs as $check_dir ) { 231 // phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition,Squiz.PHP.DisallowMultipleAssignments231 // phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition,Squiz.PHP.DisallowMultipleAssignments 232 232 if ( $checkout = @is_dir( rtrim( $check_dir, '\\/' ) . "/$vcs_dir" ) ) { 233 233 break 2; -
trunk/src/wp-admin/includes/image.php
r56548 r56695 701 701 702 702 // The denominator must not be zero. 703 if ( 0 == $denominator ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison-- Deliberate loose comparison.703 if ( 0 == $denominator ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual -- Deliberate loose comparison. 704 704 return 0; 705 705 } -
trunk/src/wp-admin/plugins.php
r56680 r56695 512 512 // Return early if all selected plugins already have auto-updates enabled or disabled. 513 513 // Must use non-strict comparison, so that array order is not treated as significant. 514 if ( $new_auto_updates == $auto_updates ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison514 if ( $new_auto_updates == $auto_updates ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual 515 515 wp_redirect( $redirect ); 516 516 exit; -
trunk/src/wp-includes/category-template.php
r56360 r56695 882 882 } elseif ( isset( $args['single_text'] ) && isset( $args['multiple_text'] ) ) { 883 883 // If no callback exists, look for the old-style single_text and multiple_text arguments. 884 // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralSing le,WordPress.WP.I18n.NonSingularStringLiteralPlural884 // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralSingular,WordPress.WP.I18n.NonSingularStringLiteralPlural 885 885 $translate_nooped_plural = _n_noop( $args['single_text'], $args['multiple_text'] ); 886 886 } else { -
trunk/src/wp-includes/formatting.php
r56693 r56695 832 832 $spaces = wp_spaces_regexp(); 833 833 834 // phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound, WordPress.WhiteSpace.PrecisionAlignment.Found -- don't remove regex indentation834 // phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound,Universal.WhiteSpace.PrecisionAlignment.Found -- don't remove regex indentation 835 835 $pattern = 836 836 '/' … … 5684 5684 } 5685 5685 5686 // phpcs:disable WordPress.WP.CapitalPDangit.Misspelled ,WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid -- 8-)5686 // phpcs:disable WordPress.WP.CapitalPDangit.MisspelledInComment,WordPress.WP.CapitalPDangit.MisspelledInText,WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid -- 8-) 5687 5687 /** 5688 5688 * Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence). -
trunk/src/wp-includes/post.php
r56623 r56695 1383 1383 1384 1384 if ( false === $args->label_count ) { 1385 // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralSing le,WordPress.WP.I18n.NonSingularStringLiteralPlural1385 // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralSingular,WordPress.WP.I18n.NonSingularStringLiteralPlural 1386 1386 $args->label_count = _n_noop( $args->label, $args->label ); 1387 1387 } -
trunk/tests/phpunit/tests/customize/manager.php
r56687 r56695 1346 1346 // User saved as one who can bypass content_save_pre filter. 1347 1347 $this->assertStringContainsString( '<script>', get_option( 'custom_html_1' ) ); 1348 $this->assertStringContainsString( 'Wordpress', get_option( 'custom_html_1' ) ); // phpcs:ignore WordPress.WP.CapitalPDangit.Misspelled 1348 $this->assertStringContainsString( 'Wordpress', get_option( 'custom_html_1' ) ); // phpcs:ignore WordPress.WP.CapitalPDangit.MisspelledInText 1349 1349 1350 1350 // User saved as one who cannot bypass content_save_pre filter. -
trunk/tests/phpunit/tests/formatting/capitalPDangit.php
r53562 r56695 1 1 <?php 2 // phpcs:disable WordPress.WP.CapitalPDangit.Misspelled -- 🙃2 // phpcs:disable WordPress.WP.CapitalPDangit.MisspelledInText -- 🙃 3 3 4 4 /** -
trunk/tests/phpunit/tests/meta.php
r54891 r56695 379 379 $string_mid = "{$meta_id}.0"; 380 380 381 // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison-- intentional implicit casting check381 // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual -- intentional implicit casting check 382 382 $this->assertTrue( floor( $string_mid ) == $string_mid ); 383 383 $this->assertNotFalse( get_metadata_by_mid( 'user', $string_mid ) );
Note: See TracChangeset
for help on using the changeset viewer.