Skip to content

A Rust linter: codeupipe-lint for Rust - #19

Merged
JoshuaWink merged 1 commit into
betafrom
feat/rust-lint
Oct 28, 2026
Merged

JoshuaWink merged 1 commit into
betafrom
feat/rust-lint

Conversation

@JoshuaWink

Copy link
Copy Markdown
Member

Phase 4 of docs/rust-plan.md: a linter for Rust code that uses codeupipe, in packages/codeupipe-lint-rs.

What it is

  • A codeupipe pipeline of 11 Filters, in the order of the TypeScript linter. The steps carry LintRun, a payload type of its own (it holds syntax trees), so the linter is also a real use of custom payload types.
  • It reads the source with syn and checks the rules the compiler does not: CUP-I000, A003, A005, I003, I005, I006, I007, and the warnings I008 and I009.
  • The rule ids, the report, the exit codes (0 / 1 / 2), the cup: allow-... markers, --strict, --exclude, --disable and cup.config.json are those of the Python and TypeScript linters.
  • A001, A002, A008, A009, I004 and I001 have no rule: the Rust types refuse that code at compile time.
  • Rust details: file names in snake_case, and I008 reported on each impl block so its marker sits by the code. Text in a doc comment or a string is not a marker.
  • It is a Cargo workspace of its own (it needs syn and serde_json), so the runtime still builds with no download.

The repository passes it

  • Six step types declared inside test functions in codeupipe-rs/tests moved to the top of their files. The test of a plain nested pipeline's label has an allow-anonymous marker, on purpose.
  • 45 cup: allow-plain markers, each with a reason: the runtime's own types, the conformance runner's JSON reader and entry point, and the linter's helpers.

CI

A new job, Rust linter: fmt, clippy, tests, the linter with --strict on all the Rust code of the repository (runtime, examples, tests, conformance runner, the linter), and Rust 1.75.

Checked locally

  • Linter: 31 tests, clippy and fmt clean; --strict on the repository: No findings (56 suppressed).
  • Core crate: 75 tests, clippy and fmt clean. Conformance rust:run: 30 / 30.
  • Python: 576 tests, codeupipe_lint.invariants --strict clean.
  • Not run locally: the Rust 1.75 build of the linter (only 1.89 is installed). Every dependency declares an MSRV of 1.71 or lower, and Cargo.lock is version 3.

🤖 Generated with Claude Code

packages/codeupipe-lint-rs: codeupipe-lint, a codeupipe pipeline of 11
Filters that carries a LintRun of its own in place of a Payload. It reads
the source with syn and checks the rules that the Rust compiler does not:
CUP-I000, A003, A005, I003, I005, I006, I007, and the warnings I008 and
I009. The ids, the report, the exit codes, the markers and cup.config.json
are those of the Python and TypeScript linters.

It is a Cargo workspace of its own, so the runtime still builds offline.
A new CI job runs fmt, clippy, the tests, the linter with --strict on all
the Rust code of the repository, and Rust 1.75.

The Rust code passes it: step types declared in test functions moved to
the top of their files, and cup: allow-plain markers with a reason on the
runtime's own types, the conformance runner and the linter's helpers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JoshuaWink
JoshuaWink merged commit 1b914dc into beta Oct 28, 2026
12 checks passed
@JoshuaWink
JoshuaWink deleted the feat/rust-lint branch October 28, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant