2
0
Fork 0
mirror of https://github.com/discourse/wp-discourse.git synced 2025-10-04 09:01:05 +08:00
wp-discourse/phpcs.xml
Angus McLeod cb91768161
Two Four Seven (#469)
* Add comment block

* Various bugfixes

* Bump versions

* Fix unit tests

* phpcs fixes

* Escape html output

* Update .jshintignore

* Update WP PHPCS usage && fix warning in log_viewer

* Update contact section of readme

We'll be closing issues on the github repo and directing all contact to https://meta.discourse.org/c/support/wordpress
2022-12-23 11:28:43 -08:00

52 lines
2.4 KiB
XML

<?xml version="1.0"?>
<ruleset name="">
<description>A custom set of code standard rules for the WP Discourse plugin.</description>
<rule ref="WordPress">
<exclude name="Generic.Files.LowercasedFilename" />
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed" />
<!-- DOMDocument uses camelCase. -->
<exclude name="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase" />
<exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCase" />
</rule>
<rule ref="PHPCompatibility"/>
<extensions>php</extensions>
<exclude-pattern>*/blocks/comments/build</exclude-pattern>
<exclude-pattern>*/lib/wp-new-user-notification.php*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/admin/discourse-sidebar/node_modules</exclude-pattern>
<exclude-pattern>*/admin/discourse-sidebar/build</exclude-pattern>
<exclude-pattern>*/vendor_namespaced/*</exclude-pattern>
<exclude-pattern>*.js</exclude-pattern>
<exclude-pattern>*.css</exclude-pattern>
<exclude-pattern>scoper.inc.php</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<rule ref="Squiz.Commenting.FunctionComment.Missing">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.InlineComment.InvalidEndChar">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.MissingParamTag">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.ParamNameNoMatch">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Generic.Commenting">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.DB.PreparedSQL">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
</ruleset>