Skip to content

Add option to format all files #4977

@dylni

Description

@dylni

It would be helpful for rustfmt to have an option to format all .rs files in a crate or all files in a directory.

Some issues exist due to rustfmt being unable to know exactly which files are included, due to #[path] attributes (1) or macros (1, 2, 3). However, usually, all that is needed is for every Rust file to be formatted. If rustfmt had an option to format all files, those issues would be avoided.

This could be combined with the ignore option to exclude some files.

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