Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Run Rust formatting, tests, and Clippy in CI

Đang mở
#443 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
github-actions, rust
Lĩnh vực
ci-cd, testing

Hướng nghiên cứu

Bắt đầu với hai job xác thực trong .github/workflows/ci.yml:27-44 và 46-62, sau đó kiểm tra ./scripts/test.py --operation validate và src/lib.rs. Chạy các lệnh cargo fmt, cargo test và cargo clippy được liệt kê để tái hiện các lỗi hiện tại; hoàn tất khi CI thực thi chúng, src/roc_platform_abi.rs được tạo có các ngoại lệ được ghi chép và giới hạn chặt chẽ, đồng thời các bài kiểm tra host-helper được yêu cầu và hướng dẫn dành cho người đóng góp đều có mặt.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Rust
Star
121
Fork
46
Merge trung bình
20 giờ 53 phút
Pull request đã merge (30 ngày)
11

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của roc-lang/basic-cli

Tất cả issue của roc-lang/basic-cli

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.