Suppress verified false-positive PHPCS/Plugin Check warnings, remove redundant textdomain load#670
Open
miyanialkesh7 wants to merge 2 commits into
Open
Suppress verified false-positive PHPCS/Plugin Check warnings, remove redundant textdomain load#670miyanialkesh7 wants to merge 2 commits into
miyanialkesh7 wants to merge 2 commits into
Conversation
…k tags WordPress.org already auto-loads this plugin's bundled translations by matching the text domain to the plugin slug, so the manual load_plugin_textdomain() call flagged by the WordPress.org Plugin Check tool is unnecessary. Also add the @var/@param docblock tags on Plugin.php flagged by PHPCS.
Add justified phpcs:ignore comments for two categories of warnings verified as false positives or accepted risk during the Plugin Check review, so CI comes back clean instead of carrying unexplained warnings: - WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound (call sites): PHPCS cannot statically resolve a self::CONST value, but every constant used is already prefixed with "msls_". - WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in (call sites): admin-only or capability-checked, paginated queries where the excluded-ID set comes from TranslatedPostIdQuery, not attacker-controlled input.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
load_plugin_textdomain()call flagged by the WordPress.org Plugin Check tool; WordPress.org already auto-loads this plugin's bundled translations by matching the text domain to the plugin slug, so the manual call (and theinitaction registering it) is unnecessary.@var/@paramdocblock tags onPlugin.phpflagged by PHPCS.phpcs:ignorecomments for two categories of warnings verified as false positives / accepted risk during Plugin Check review, so CI comes back clean instead of carrying unexplained warnings:WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound— PHPCS can't statically resolve aself::CONSTvalue, but every constant used is already prefixed withmsls_.WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in— admin-only or capability-checked, paginated queries where the excluded-ID set comes fromTranslatedPostIdQuery, not attacker-controlled input.Context
Split out of #668 to keep scope focused, per maintainer feedback. No behavior change beyond removing the redundant textdomain load; the rest is docblocks and static-analysis suppressions.
Test plan
load_plugin_textdomain()