You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make the Rust code rustfmt and clippy clean, then check both in CI #38
The CI lint job (added in #22) checks workflows and shell scripts, but not Rust formatting or clippy, because the tree is clean for neither:
There is no rustfmt.toml, and cargo fmt --all rewrites around 150 files. Contributors have to avoid running it and format only their own new files.
cargo clippy --workspace --all-targets -- -D warnings fails in dstudio-core (for example large_enum_variant in assistant.rs, redundant closures, and deny-level lints in the builtin/eq.rs tests). Newer toolchains add more.
What to do
Add a rustfmt.toml matching the current style as closely as possible (the code uses long lines, so max_width is likely well above 100), then run cargo fmt --allin one PR with no other changes, so the reformat is easy to review and to skip in git blame (add the commit to .git-blame-ignore-revs).
Fix or explicitly allow the clippy findings, crate by crate (small PRs). Prefer fixes; use targeted #[allow] with a reason where a lint doesn't fit (e.g. real-time code).
Add cargo fmt --all --check and cargo clippy --workspace --all-targets -- -D warnings to the lint job, pinned to the toolchain CI already uses, so a new Rust release doesn't turn the job red overnight.
When it's done
lint runs both checks and is green on main.
AGENTS.md / CONTRIBUTING no longer warn against running cargo fmt.
Large mechanical PRs conflict with everything open, so coordinate the reformat for a moment with few open PRs.
Activity