You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❗️ Warning: Absolute include path must be used. Use get_template_directory(), get_stylesheet_directory() or plugin_dir_path() (WordPressVIPMinimum.Files.IncludingFile.IncludingFile).
What problem would the enhancement address for VIP?
Currently clients include files be defining path variables or constants that get used for the path. This makes the IncludingFile rule very noisy with false postiives.
Describe the solution you'd like
We should enhance the rule check to account for path variables/constants to reduce false positives.
The text was updated successfully, but these errors were encountered:
GaryJones
changed the title
We should look into ways to minimize false positives on
Minimize false positives on WordPressVIPMinimum.Files.IncludingFile.IncludingFile
Apr 11, 2019
The variable or constants could be defined in another file, so adding code to check for existence in the current file, and then what value it has, will only reduce noise for a small percentage of cases.
In my experience, a variable or constant would typically be defined in the root of the plugin but is used in a different file in the plugin.
Constants with PATH or DIR or BASE should be not flagged after discussion with @jrfnl. There can be an option to customize with public property for the wording.
Closing as the principle premise of this issue has been addressed in #638. Further improvements for this sniff are needed, but will be addressed as part of #514.
require_once \PL\PATH . '/inc/endpoints/especiales-endpoint.php';
❗️ Warning: Absolute include path must be used. Use get_template_directory(), get_stylesheet_directory() or plugin_dir_path() (WordPressVIPMinimum.Files.IncludingFile.IncludingFile).
What problem would the enhancement address for VIP?
Currently clients include files be defining path variables or constants that get used for the path. This makes the IncludingFile rule very noisy with false postiives.
Describe the solution you'd like
We should enhance the rule check to account for path variables/constants to reduce false positives.
The text was updated successfully, but these errors were encountered: