Skip to content

Add rustfmt.toml option to disable formatting entirely #5179

@casey

Description

@casey

Many developers have their editor set up to automatically run rustfmt. However, some projects don't use rustfmt, so when such a developer works on such a project, they'll produce a bunch of unwanted changes.

To avoid this, I suggest adding an option to rustfmt.toml that disables formatting entirely. For example a format option that defaults to true, but when set to false, disables formatting.

Then, a project that doesn't use rustfmt could just add a rustfmt.toml with:

format = false

And there would be no additional burden on contributors from having to configure their editor, or on maintainers from responding to PRs with unwanted format diffs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions