You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project's current code formatting suffers from a couple of issues, affect:
tl;dr: For the sake of making contributions hassle-free it would arguably be preferable to revert to Rust's default format (as applied by rustfmt without a custom rustfmt.toml file) and used by >90% of Rust projects.
It uses a non-standard format
The Rust project recommends using the default formatting configuration to ease collaboration.
It provides a custom rustfmt.toml file but doesn't actually use it
Running cargo fmt results in 30+ reformatted files, which should not happen if the code had previously been formatted with it.
As such it is currently impossible to have rustfmt/cargo fmt apply the same formatting as used by the project. And anybody opening a PR on the project gets a nasty surprise when they notice that their IDE auto-formatted the code (as is usually desirable) and now the semantic changes are lost in thousands of formatting changes (as it just happened to me, again).
The rustfmt.toml file requires nightly and is also invalid
Further more running cargo fmt results in a bunch of warnings:
$ cargo fmt
Warning: can't set `fn_single_line = true`, unstable features are only available in nightly channel.
Warning: can't set `fn_single_line = true`, unstable features are only available in nightly channel.
`fn_call_width` cannot have a value that exceeds `max_width`. `fn_call_width` will be set to the same value as `max_width`
`chain_width` cannot have a value that exceeds `max_width`. `chain_width` will be set to the same value as `max_width`
Warning: can't set `fn_single_line = true`, unstable features are only available in nightly channel.
`fn_call_width` cannot have a value that exceeds `max_width`. `fn_call_width` will be set to the same value as `max_width`
`chain_width` cannot have a value that exceeds `max_width`. `chain_width` will be set to the same value as `max_width`
`fn_call_width` cannot have a value that exceeds `max_width`. `fn_call_width` will be set to the same value as `max_width`
`chain_width` cannot have a value that exceeds `max_width`. `chain_width` will be set to the same value as `max_width`
`fn_call_width` cannot have a value that exceeds `max_width`. `fn_call_width` will be set to the same value as `max_width`
`chain_width` cannot have a value that exceeds `max_width`. `chain_width` will be set to the same value as `max_width`
`fn_call_width` cannot have a value that exceeds `max_width`. `fn_call_width` will be set to the same value as `max_width`
`chain_width` cannot have a value that exceeds `max_width`. `chain_width` will be set to the same value as `max_width`
The project mixes CRLF and LF
37 files use CRLF
31 use LF.
The text was updated successfully, but these errors were encountered:
The project's current code formatting suffers from a couple of issues, affect:
tl;dr: For the sake of making contributions hassle-free it would arguably be preferable to revert to Rust's default format (as applied by
rustfmt
without a customrustfmt.toml
file) and used by >90% of Rust projects.It uses a non-standard format
The Rust project recommends using the default formatting configuration to ease collaboration.
It provides a custom
rustfmt.toml
file but doesn't actually use itWhile the project provides a
rustfmt.toml
file./rustfmt.toml
Running
cargo fmt
results in 30+ reformatted files, which should not happen if the code had previously been formatted with it.As such it is currently impossible to have
rustfmt
/cargo fmt
apply the same formatting as used by the project. And anybody opening a PR on the project gets a nasty surprise when they notice that their IDE auto-formatted the code (as is usually desirable) and now the semantic changes are lost in thousands of formatting changes (as it just happened to me, again).The
rustfmt.toml
file requiresnightly
and is also invalidFurther more running
cargo fmt
results in a bunch of warnings:The project mixes CRLF and LF
The text was updated successfully, but these errors were encountered: