cargo-oneway 0.1.3

One-command runner: rustfmt + clippy + oneway-lints (via dylint), with the Oneway lint set baked in
cargo-oneway-0.1.3 is not a library.

cargo-oneway

One command that runs rustfmt, clippy, and oneway-lints (via dylint) against your Rust project with the Oneway lint set baked in. No copy-paste of config files into every project.

Install

cargo install cargo-dylint dylint-link
cargo install cargo-oneway

Use

cargo oneway          # fmt --check + clippy + oneway-lints
cargo oneway fmt      # apply formatting
cargo oneway lint     # clippy + oneway-lints only
cargo oneway --fix    # autofix what's autofixable
cargo oneway help

The first cargo oneway invocation triggers cargo dylint to clone the oneway-lints library from the upstream repo and build it under the pinned nightly. Subsequent runs use the dylint cache.

Opt-out per project: oneway.toml

Drop a oneway.toml at the project root to silence specific rules for that project:

disable = [
    "no_loop",                  # a dylint rule (from oneway-lints)
    "type_derived_naming",
    "clippy::wildcard_imports", # a clippy rule
]

The CLI routes entries by prefix: clippy::* are appended as -A clippy::<name> to the clippy invocation; everything else goes to dylint via RUSTFLAGS=-A <name>.

What it does

Step Tool Config source
Format cargo fmt templates/rustfmt.toml
General lints cargo clippy templates/clippy.toml + a curated deny-list (see src/main.rs)
Oneway-specific lints cargo dylint --lib oneway_lints From the lints/ sibling crate

Why these clippy lints?

The deny-list in src/main.rs covers the Oneway lint suite's principles that clippy already handles natively — no point reimplementing what clippy does for free. See ../lints/README.md for the full picture.