Skip to content

--check does not obey the newlines settings in rustfmt.toml #3849

@Herschel

Description

@Herschel

If you have a file with CRLF newlines and newline_style = "Unix" in rustfmt.toml or vice versa, then cargo fmt -- --check does not output any diff or exit with an error code.

Running cargo fmt itself updates the line endings as desired. --check seems to obey other settings in rustfmt.toml.

Occurs on both rustfmt 1.4.8-nightly (2019-10-04) and rustfmt 1.4.4-stable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICE

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions