matklad
September 14, 2024, 12:00pm
1
I really like --message-format=short
option:
cargo r -r --message-format=short
Compiling abont-egui v0.0.0 (/home/matklad/p/abont/proto/abont-egui)
abont-egui/src/lib.rs:3:5: warning: unused import: `process::Termination`
abont-egui/src/lib.rs:8:5: warning: unused import: `eframe::glow::COLOR`
abont-egui/src/lib.rs:9:12: warning: unused import: `Color32`
abont-egui/src/lib.rs:18:18: warning: use of deprecated function `std::thread::sleep_ms`: replaced by `std::thread::sleep`
abont-egui/src/lib.rs:29:24: warning: unused variable: `cc`
Is there some way to globally enable it, so that this is the default format for rustc messages on my machine?
1 Like
hax10
September 14, 2024, 12:57pm
2
You could add an alias in your Cargo config file ~/.cargo/config
https://doc.rust-lang.org/cargo/reference/config.html
[alias]
r = "run -r --message-format=short"
and then from the command line:
cargo r
1 Like
jofas
September 14, 2024, 3:17pm
3
Might be worth filing a feature request (couldn't find one) for a CARGO_MESSAGE_FORMAT
environment variable and/or a configuration option under [term]
(which'd be the two most obvious places to put global configuration of the message format IMO).
If you do file an issue for this and the Cargo devs are in favour of it, please share a link here, I'd be interested in implementing this
1 Like
system
Closed
December 13, 2024, 3:18pm
4
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.