-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Milestone
Description
We can silence the error code WordPress.WP.AlternativeFunctions.file_system_read_fclose since it's redundant, as the error is already triggered when fopen() is called:
VIP-Coding-Standards/WordPress-VIP-Go/ruleset.xml
Lines 112 to 114 in 1fa0266
| <rule ref="WordPress.WP.AlternativeFunctions.file_system_read_fopen"> | |
| <message>File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/</message> | |
| </rule> |
Two things:
- remove the custom error message here:
VIP-Coding-Standards/WordPress-VIP-Go/ruleset.xml
Lines 115 to 117 in 1fa0266
<rule ref="WordPress.WP.AlternativeFunctions.file_system_read_fclose"> <message>File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/</message> </rule> - silence the error code since it's being inherited at the
WordPressVIPMinimumlevel:<rule ref="WordPress.WP.AlternativeFunctions">
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels