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 天内回复