Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Run Rust formatting, tests, and Clippy in CI

未关闭
#443 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
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
星标
121
派生
46
平均合并
20 小时 53 分钟
30 天内合并 PR
11

环境准备

  • 没有 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 摘要。