Skip to content

Read config from .config/mutants.toml and [workspace.metadata.mutants] #645

Description

@theaddonn

cargo-mutants already reads .cargo/mutants.toml, thanks! I'm trying to get Rust tools to agree on where config can live, and opening similar requests with rustfmt, clippy, nextest and cargo-deny. Today a typical repo has:

.cargo/config.toml     # cargo
.cargo/mutants.toml    # cargo-mutants (default location)
.cargo/deny.toml       # cargo-deny (supported alongside deny.toml)
.config/nextest.toml   # cargo-nextest (only location)
rustfmt.toml           # rustfmt
clippy.toml            # clippy

Two additions would let cargo-mutants fit whichever layout a project picks:

  1. Also read .config/mutants.toml, checked after .cargo/mutants.toml so the current default keeps priority. nextest only reads .config/, so projects that consolidate there currently need --config for mutants.
  2. Also read [workspace.metadata.mutants] (or [package.metadata.mutants] for a single-crate root) from the root Cargo.toml, as the lowest-priority fallback when no config file exists. Several tools (e.g. bacon, typos) already support this, and it lets small projects avoid a separate file entirely.

--config and --no-config would behave as they do now.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions