We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cargo fmt parses the Cargo.toml and then generates its own list of files to format.
cargo fmt
$ strace -f -e execve -s 4096 cargo fmt -- src/customlog.rs execve("/nix/store/lw6s4749i3z2kpg26742ivjcq746jvv2-devshell-dir/bin/cargo", ["cargo", "fmt", "--", "src/customlog.rs"], 0x7ffd5c548050 /* 82 vars */) = 0 execve("/nix/store/lw6s4749i3z2kpg26742ivjcq746jvv2-devshell-dir/bin/cargo-fmt", ["/nix/store/lw6s4749i3z2kpg26742ivjcq746jvv2-devshell-dir/bin/cargo-fmt", "fmt", "--", "src/customlog.rs"], 0x55be3c2d64c0 /* 85 vars */) = 0 strace: Process 3095549 attached [pid 3095549] execve("/nix/store/fk9vq870hfgwj8w92r4zysvj3a52mzgh-rust/bin/cargo", ["/nix/store/fk9vq870hfgwj8w92r4zysvj3a52mzgh-rust/bin/cargo", "metadata", "--format-version", "1", "--no-deps", "--offline"], 0x7ffecc7ef7e0 /* 85 vars */) = 0 [pid 3095549] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3095549, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- strace: Process 3095550 attached [pid 3095550] execve("/nix/store/lw6s4749i3z2kpg26742ivjcq746jvv2-devshell-dir/bin/rustfmt", ["rustfmt", "/home/zimbatm/go/src/github.com/numtide/prjfmt/src/lib.rs", "/home/zimbatm/go/src/github.com/numtide/prjfmt/src/main.rs", "--edition", "2018", "src/customlog.rs"], 0x7ffecc7ef7e0 /* 85 vars */) = 0 [pid 3095550] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3095550, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- +++ exited with 0 +++
You can see that 3095550 rustfmt is being invoked with the list of files of the project, plus the one passed as an argument.
The text was updated successfully, but these errors were encountered:
I think it makes more sense to use rustfmt directly for Rust. cargo fmt is basically prjfmt for Rust (it uses rustfmt under the hood) 😄
rustfmt
prjfmt
Sorry, something went wrong.
I think so too. The only missing bit is to keep the --edition flag in sync with the Cargo.toml file.
--edition
I documented this briefly in docs/formatters.md . Let's add all the formatters and their support status there.
Merge pull request 'feat: introduce concept of pipelines for better c…
5d341f9
…oncurrency' (#30) from feat/concurrency-refactor into main Reviewed-on: https://git.numtide.com/numtide/treefmt/pulls/30
No branches or pull requests
cargo fmt
parses the Cargo.toml and then generates its own list of files to format.You can see that 3095550 rustfmt is being invoked with the list of files of the project, plus the one passed as an argument.
The text was updated successfully, but these errors were encountered: