Skip to content

build: enforce cargo fmt --check in lint gate #28

@membphis

Description

@membphis

Background

make lint runs cargo clippy -D warnings but explicitly skips cargo fmt --check. The reason: the codebase uses intentional manual column alignment in struct definitions and compact single-line literals that default rustfmt would reflow.

Options

  1. Add a rustfmt.toml that preserves the intentional formatting (e.g. max_width, imports_granularity, disabled rules for struct fields) and then enable cargo fmt --check in make lint and CI.
  2. Keep the current state: document the decision in CLAUDE.md and leave fmt unenforced. Close this issue as "by design".

Why track this

The current state means contributors get no automatic style feedback from CI. Option 1 is preferable if a rustfmt.toml can be written that matches the existing formatting without rewrites.

Acceptance criteria (for option 1)

  • cargo fmt --check passes on the current codebase without any source changes.
  • make lint includes the fmt check.
  • CI matrix includes the fmt check as a separate step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions