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
It would be nice to have an option to only run rustfmt if there's a rustfmt.toml file in the crate root. This would make it easier to selectively enable automatic formatting for individual projects.
Sure, but which flag? Do you mean --config-path? It will just use the default settings if it can't find a config file. What I'm talking about is making it not run at all if there is no config file. I tested with rustfmt --config-path ./ src/lib.rs in the root of one of my projects.
Sorry Ogeon, I misunderstood your intentions.
I'll think about it (maybe add a new config in package setting), to disable rustfmt unless rustfmt.toml exists in the next coming version.
Activity
vincenting commentedon Aug 10, 2016
Hi, Please upgrade to version 0.3.0 and try our new feature(args support for rustfmt).
Ogeon commentedon Aug 10, 2016
Does
rustfmtreally have such an option? I can't find it.vincenting commentedon Aug 11, 2016
@Ogeon Try to upgrade your rustfmt with following commands:
cargo uninstall rustfmtcargo install rustfmtThen you will find its usage by
rustfmt --helpOgeon commentedon Aug 11, 2016
Sure, but which flag? Do you mean
--config-path? It will just use the default settings if it can't find a config file. What I'm talking about is making it not run at all if there is no config file. I tested withrustfmt --config-path ./ src/lib.rsin the root of one of my projects.vincenting commentedon Aug 11, 2016
Sorry Ogeon, I misunderstood your intentions.
I'll think about it (maybe add a new config in package setting), to disable rustfmt unless rustfmt.toml exists in the next coming version.
Thank you for your advice.
Ogeon commentedon Aug 11, 2016
No worries. 😄 I think a config parameter would be great.