Skip to content

cargo fmt --all not formatting all files #3341

@gnzlbg

Description

@gnzlbg

Running cargo fmt all -v in the libc repository (https://github.com/rust-lang/libc) outputs:

[test (2015)] "/libc/libc-test/test/main.rs"
[test (2015)] "/libc/libc-test/test/linux_fcntl.rs"
[test (2015)] "/libc/libc-test/test/cmsg.rs"
[custom-build (2015)] "/libc/build.rs"
[lib (2015)] "/libc/src/lib.rs"
[custom-build (2015)] "/libc/libc-test/build.rs"
rustfmt --edition 2015 /libc/libc-test/test/main.rs /Users/gnzlbg/projects/sideprojects/libc/libc-test/test/linux_fcntl.rs /libc/libc-test/test/cmsg.rs /Users/gnzlbg/projects/sideprojects/libc/build.rs /libc/src/lib.rs /Users/gnzlbg/projects/sideprojects/libc/libc-test/build.rs

and returns success. It appears that most files are not formatted by the tool. Modifying a file like src/unix/solaris/mod.rs to introduce incorrect formatting does not appear to cause cargo fmt to reformat the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-macrosbugPanic, non-idempotency, invalid code, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions