Skip to content
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

Update PHPCS config #177

Merged
merged 5 commits into from
Aug 30, 2023
Merged
Changes from 4 commits
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
25 changes: 2 additions & 23 deletions WP_CLI_CS/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,6 @@

<!-- Keep short ternaries around for WP-CLI. -->
<exclude name="Universal.Operators.DisallowShortTernary.Found"/>

<!-- Allow filesystem operations because WordPress APIs may not be available -->
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_chgrp" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_chmod" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_chown" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_fclose" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_file_put_contents" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_fopen" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_fputs" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_fread" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_fsockopen" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_fwrite" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_is_writable" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_is_writeable" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_mkdir" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_pfsockopen" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_readfile" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_rmdir" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_touch" />
<exclude name="WordPress.WP.AlternativeFunctions.rename_rename" />
<exclude name="WordPress.WP.AlternativeFunctions.unlink_unlink" />
swissspidy marked this conversation as resolved.
Show resolved Hide resolved

</rule>


Expand All @@ -125,7 +103,7 @@
See: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#error-silencing-use-build-in-function-whitelist -->
<rule ref="WordPress.PHP.NoSilencedErrors">
<properties>
<property name="use_default_whitelist" value="true"/>
<property name="usePHPFunctionsList" value="true"/>
</properties>
</rule>

Expand All @@ -145,6 +123,7 @@
<property name="exclude" type="array">
<element value="curl"/>
<element value="file_get_contents"/>
<!-- Allow filesystem operations because WordPress APIs may not be available -->
<element value="file_system_operations"/>
<!-- As PHP 5.4. is the minimum for most projects, using json_encode() is fine. -->
<element value="json_encode"/>
Expand Down
Loading