Review the WordPressVIPMinimum.Performance.NoPaging sniff
还没有人认领这个 Issue。
评估
调研方向
首先定位 WordPressVIPMinimum.Performance.NoPaging sniff 的实现及其测试,然后根据当前行为和 PHPCSUtils 的支持情况检查清单。完成的标准是:已审查相关案例、诊断信息、严重性、文档以及下一次 major 版本发布相关的注意事项,并在适用的情况下添加测试。
由索引模型根据 Issue 内容生成。
描述
Review the WordPressVIPMinimum.Performance.NoPaging sniff for the following in as far as relevant to that sniff:
- Code style independent sniffing / Correct handling of quirky code
Typical things to add tests for and verify correct handling of:- Nested function/closure declarations
- Nested class declarations
- Comments in unexpected places
- Variables being assigned to via
liststatements - Multiline text strings
- Text strings provided via heredoc/nowdoc
- Use of short open tags
- Using PHP close tag as end of statement
- Inline control structures (without braces)
- Code simplifications which can be made using PHPCSUtils
- Sniff stability improvements which can be made using PHPCSUtils
- Correct handling of modern PHP code
Typical things to add tests for and verify correct handling of (where applicable):- PHP 5.0 Try/catch/finally (PHP 5.5) and exceptions
- PHP 5.3 Namespaced code vs code in the global namespace
- PHP 5.3 Use import statements, incl aliasing
- PHP 5.3 Short ternaries
- PHP 5.3 Closures, incl closure use
- PHP 5.4 Short arrays
- PHP 5.5 Class name resolution using
::class - PHP 5.5 List in foreach
- PHP 5.5/7.0 Generators using yield and yield from
- PHP 5.6 Constant scalar expressions
- PHP 5.6 Importing via
use function/const - PHP 7.0 Null coalesce
- PHP 7.0 Anonymous classes
- PHP 7.0 Scalar and return type declarations
- PHP 7.0 Group use statements
- PHP 7.1 Short lists
- PHP 7.1 Keyed lists
- PHP 7.1 Multi-catch
- PHP 7.1 Nullable types
- PHP 7.3 List reference assignments
- PHP 7.4 arrow functions
- PHP 7.4 numeric literals with underscores
- PHP 7.4 null coalesce equals
- PHP 7.4 Typed properties
- Various versions: trailing comma's in function calls, group use, function declarations, closure use etc
Other:
- Review violation error vs warning
- Review violation severity
- Review violation message, consider adding a link
- Check open issues related to the sniff
- Review PHPDoc comments
Sniff basics, but changes need to be lined up for next major release:
- Inappropriate use of
publicproperties (#234) - Modular error codes (unique error code for each distinct message)
Once PHPCS/PHPCSUtils supports this:
- PHP 8.0 Constructor property promotion
- PHP 8.0 Union types
- PHP 8.0
matchexpressions - PHP 8.0 Nullsafe operator
- PHP 8.0 Named arguments
- PHP 8.0 Single token namespaced names
- 主要语言
- PHP
- 星标
- 261
- 派生
- 44
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Automattic/VIP-Coding-Standards 的其他 Issue
-
AlwaysReturnInFilter: isInsideIfConditonal() guards the conditions array after reading it可能已有人在做 @tomjn 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
Bug: PreGetPosts warns when the early is_main_query() return is not the first statement in its if可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 3/5 1-2 天 新手友好度 76/100
-
Suppress filters in get_posts false positive可能已有人在做 @tomjn 于 5 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 48/100
-
Breaking Change Type: Maintenance
难度 4/5 3-5 天 新手友好度 35/100
Automattic/VIP-Coding-Standards#849 · 1 条评论 ·
查看 Automattic/VIP-Coding-Standards 的全部 Issue
相似的 Issue
-
customer-support needs-triage Platform(Default)
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
grokability/snipe-it#19767 ·
维护者通常 1 天内回复
-
[Code Quality] SfxDownloader extract path has no destination-writability pre-check for cached zips未关闭priority:low type:refactor
难度 2/5 1-3 小时 新手友好度 84/100
crazy-goat/workerman-bundle#1052 ·
维护者通常 1 天内回复
-
sync-en
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
sync-en
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 3 天内回复