Changeset 56695 for trunk/phpcs.xml.dist
- Timestamp:
- 09/26/2023 12:24:43 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.