Format the code with rustfmt and check formatting and lints in CI
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 88/100
研究方向
先執行 cargo fmt --all 並單獨提交,然後檢查 cargo fmt --all --check 沒有任何輸出。接著編輯 .github/workflows/ci.yml,在 Test 之前新增 fmt 和 clippy 步驟,並在 dtolnay/rust-toolchain@stable 步驟中加入 components: rustfmt, clippy。最後在 CONTRIBUTING.md 中新增一行。當兩條 cargo 指令在本機和 CI 中都通過,且行為沒有改變時,即完成。
由索引模型根據 Issue 內容生成。
描述
The Rust code isn't run through rustfmt yet, so contributors who format their changes get unrelated diffs in other files. cargo fmt --all --check currently reports differences in 14 files. cargo clippy --workspace --all-targets is already clean, but nothing keeps it that way.
This is a good first contribution: no Windows API knowledge needed.
What to do
-
Run
cargo fmt --alland commit the result on its own, with no other changes, so it is easy to review. -
In
.github/workflows/ci.yml, add two steps before Test:cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warnings
dtolnay/rust-toolchain@stableneedscomponents: rustfmt, clippyfor these to work. -
Mention in CONTRIBUTING.md that contributors should run
cargo fmt --allbefore opening a pull request.
Done when
cargo fmt --all --checkandcargo clippy --workspace --all-targets -- -D warningsboth pass locally and in CI.- No code behaviour changes.
- 主要語言
- Rust
- 星號
- 7
- 分支
- 1
- 平均合併
- 6 小時 34 分鐘
- 30 天內合併 PR
- 2
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CodingRule/Hidely 的其他 Issue
-
accessibility help wanted
難度 2/5 1-3 小時 新手友好度 72/100
CodingRule/Hidely#15 ·
-
compatibility help wanted testing
難度 2/5 1-3 小時 新手友好度 72/100
CodingRule/Hidely#14 ·
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 85/100
CodingRule/Hidely#13 ·
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 84/100
CodingRule/Hidely#3 ·
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 88/100
CodingRule/Hidely#2 ·
查看 CodingRule/Hidely 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 2 天內回覆
-
autofixer: follow-up
難度 2/5 1-3 小時 新手友好度 78/100
tursodatabase/turso#12531 ·
維護者通常 1 天內回覆
-
bug help wanted ui
難度 2/5 1-3 小時 新手友好度 82/100
userFRM/egui-charts#4292 ·
維護者通常 1 天內回覆
-
Issue-Bug Need-Review
難度 1/5 1-3 小時 新手友好度 85/100
PowerShell/DSC#1832 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆