Skip to content

can cargo fmt or rustfmt format a list of files please? #4485

Closed
@gilescope

Description

@gilescope

Pre-commit is widely used and one of the standard approaches is to call a tool with a list of modified files to process. It's pretty common across unix for commands to accept a list of files.

At the moment between cargo fmt and rustfmt there doesn't seem to be a nice way to have pre-commit just run the formatter against just the files that have changed rather than all the files. We can do it by writing some python wrapper around rustfmt but it would be nice if we could just use it out of the box.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions