Review the WordPressVIPMinimum.Files.IncludingFile sniff
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
先從 WordPressVIPMinimum.Files.IncludingFile sniff 及其現有測試涵蓋率開始,然後檢視檢查清單中的相關語法案例、PHPCSUtils 簡化、穩定性、嚴重性、訊息、PHPDoc 和相關 issue。視需要新增針對性的測試,並記錄或實作已達成共識的改進;在 PHPCS/PHPCSUtils 支援 PHP 8 功能之前,這些功能仍維持封鎖狀態。
由索引模型根據 Issue 內容生成。
描述
Review the WordPressVIPMinimum.Files.IncludingFile 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
- 平均合併
- 3 天 9 小時
- 30 天內合併 PR
- 10
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Automattic/VIP-Coding-Standards 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 48/100
Automattic/VIP-Coding-Standards#876 ·
維護者通常 1 天內回覆
-
Breaking Change Type: Maintenance
難度 4/5 3-5 天 新手友好度 35/100
Automattic/VIP-Coding-Standards#849 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 45/100
Automattic/VIP-Coding-Standards#832 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 48/100
Automattic/VIP-Coding-Standards#823 ·
維護者通常 1 天內回覆
-
Status: Awaiting feedback
難度 2/5 1-3 小時 新手友好度 45/100
Automattic/VIP-Coding-Standards#754 · 3 則留言 ·
維護者通常 1 天內回覆
查看 Automattic/VIP-Coding-Standards 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 83/100
nunomaduro/collision#375 ·
-
HTTP::setGetVar() duplicates the base path for root-relative URLs when the site runs in a subfolder未關閉
難度 2/5 1-3 小時 新手友好度 74/100
silverstripe/silverstripe-framework#12034 ·
-
needs triage
難度 2/5 1-3 小時 新手友好度 72/100
-
loginWithCustomTokenExchange() fails when an organization is configured可能已有人在做 @awss1i 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 2 天內回覆
-
type/bug
難度 1/5 1 小時以內 新手友好度 75/100
flarum/framework#5231 · 1 則留言 ·
維護者通常 1 天內回覆