Skip to content

Commit

Permalink
Merge pull request #178 from wp-cli/fix/add-missing-filesystem-functi…
Browse files Browse the repository at this point in the history
…on-exceptions
  • Loading branch information
swissspidy authored Aug 30, 2023
2 parents bd3f6d6 + 6f236cb commit 21889bd
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion WP_CLI_CS/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,23 @@
<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" />

Expand Down Expand Up @@ -131,7 +145,7 @@
<property name="exclude" type="array">
<element value="curl"/>
<element value="file_get_contents"/>
<element value="file_system_read"/>
<element value="file_system_operations"/>
<!-- As PHP 5.4. is the minimum for most projects, using json_encode() is fine. -->
<element value="json_encode"/>
</property>
Expand Down

0 comments on commit 21889bd

Please sign in to comment.