Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
phpcs.xml.dist update
  • Loading branch information
aristath committed Mar 2, 2023
commit d2e929276897fd91e3e2f28195baf5172dbca855
13 changes: 12 additions & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@
<exclude-pattern>/src/wp-includes/class-requests\.php</exclude-pattern>
<exclude-pattern>/src/wp-includes/class-simplepie\.php</exclude-pattern>
<exclude-pattern>/src/wp-includes/class-snoopy\.php</exclude-pattern>
<exclude-pattern>/src/wp-includes/class-wp-block-parser\.php</exclude-pattern>
<exclude-pattern>/src/wp-includes/deprecated\.php</exclude-pattern>
<exclude-pattern>/src/wp-includes/ms-deprecated\.php</exclude-pattern>
<exclude-pattern>/src/wp-includes/pluggable-deprecated\.php</exclude-pattern>
Expand Down Expand Up @@ -185,6 +184,18 @@
<exclude-pattern>/tests/phpunit/tests/multisite/site\.php</exclude-pattern>
</rule>

<!-- Allow non-snakecase vars & properties for block-related classes. -->
<rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase">
<exclude-pattern>/src/wp-includes/class-wp-block-parser\.php</exclude-pattern>
<exclude-pattern>/src/wp-includes/class-wp-block-parser-block\.php</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase">
<exclude-pattern>/src/wp-includes/class-wp-block-parser-block\.php</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase">
<exclude-pattern>/src/wp-includes/class-wp-block-parser-block\.php</exclude-pattern>
</rule>

<!-- Allow the I18n functions file for issues identified by the I18n sniff
(such as calling the low-level translate() function). -->
<rule ref="WordPress.WP.I18n">
Expand Down