Add warning for list_files function and related
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
找出現有的 PHP_CodeSniffer 規則,這些規則用於檢查 WordPress 和 VIP 專用的函式,然後檢視警告的定義與測試方式。確認 list_files、scandir 和 opendir 的預期警告行為,包括提供的 list_files 範例;完成的標準是這些呼叫都能一致地被回報。
由索引模型根據 Issue 內容生成。
描述
What problem would the enhancement address for VIP?
I've recently been doing a code review and noticed the list_files function had no warning attached. On VIP Filesystem, the list_files, scandir, opendir will return empty result sets or false, so we should probably highlight this to customers to avoid unexpected results.
Describe the solution you'd like
A warning should be added when the following functions are coded:
- list_files - WP
- scandir - PHP
- opendir - PHP
What code should be reported as a violation?
$files = list_files( $folder, 2 );
What code should not be reported as a violation?
Additional context
- 主要語言
- 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 天內回覆