Repository navigation
A Rust linter: codeupipe-lint for Rust - #19
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 4 of
docs/rust-plan.md: a linter for Rust code that uses codeupipe, inpackages/codeupipe-lint-rs.What it is
LintRun, a payload type of its own (it holds syntax trees), so the linter is also a real use of custom payload types.synand checks the rules the compiler does not: CUP-I000, A003, A005, I003, I005, I006, I007, and the warnings I008 and I009.cup: allow-...markers,--strict,--exclude,--disableandcup.config.jsonare those of the Python and TypeScript linters.implblock so its marker sits by the code. Text in a doc comment or a string is not a marker.synandserde_json), so the runtime still builds with no download.The repository passes it
codeupipe-rs/testsmoved to the top of their files. The test of a plain nested pipeline's label has anallow-anonymousmarker, on purpose.cup: allow-plainmarkers, 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
--stricton all the Rust code of the repository (runtime, examples, tests, conformance runner, the linter), and Rust 1.75.Checked locally
--stricton the repository:No findings (56 suppressed).rust:run: 30 / 30.codeupipe_lint.invariants --strictclean.🤖 Generated with Claude Code