Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Run Rust formatting, tests, and Clippy in CI

已關閉
#443 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@lukewilliamboswell 已經在處理了。

開始於 2026年10月12日。

  • #514 來自 @lukewilliamboswell —— 已合併

評估

難度
4/5
預估耗時
3-5 天
新手友好度
45/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
github-actions, rust
領域
ci-cd, testing

研究方向

先從 .github/workflows/ci.yml:27-44 和 46-62 中的兩個驗證工作開始,然後檢查 ./scripts/test.py --operation validate 和 src/lib.rs。執行列出的 cargo fmt、cargo test 和 cargo clippy 命令以重現目前的失敗;完成的標準是 CI 強制執行這些檢查,產生的 src/roc_platform_abi.rs 具有範圍狹窄且有文件說明的例外,並且所要求的 host-helper 測試和貢獻者說明都已存在。

由索引模型根據 Issue 內容生成。

描述

ci

Context

The CI jobs named “Format, check, and test examples” run ./scripts/test.py --operation validate:

  • .github/workflows/ci.yml:27-44
  • .github/workflows/ci.yml:46-62

That validation runs Roc tests/format/check operations, but it does not run Rust formatting, Rust tests, or Clippy. At commit 295000a during the release-candidate audit:

  • cargo check --locked --all-targets passed;
  • cargo fmt --all -- --check failed on formatting in src/lib.rs;
  • cargo test --locked --all-targets passed but ran zero Rust tests;
  • cargo clippy --locked --all-targets -- -D warnings failed on generated acronym names and a raw-pointer ABI lint.

The generated src/roc_platform_abi.rs needs targeted lint allowances rather than disabling useful linting for handwritten host code.

Suggested direction

Add a dedicated Rust validation job or extend the current validation job to run:

  • cargo fmt --all -- --check
  • cargo test --locked --all-targets
  • cargo clippy --locked --all-targets -- -D warnings

Configure narrow allowances for generated glue. Add unit tests for pure host helpers and error mappings so cargo test provides meaningful coverage in addition to end-to-end Roc examples.

Acceptance criteria

  • Rust formatting is required by CI and the current formatting difference is fixed.
  • Handwritten Rust passes Clippy with warnings denied.
  • Generated glue has documented, narrowly scoped lint allowances.
  • Rust tests cover representative HTTP method/error mapping, TCP read helpers, SQLite lifecycle helpers, and filesystem classification.
  • Contributor verification instructions list the same commands CI runs.
主要語言
Rust
星號
123
分支
46
平均合併
10 小時 59 分鐘
30 天內合併 PR
21

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

roc-lang/basic-cli 的其他 Issue

查看 roc-lang/basic-cli 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。