language-formatters-pre-commit-hooks
language-formatters-pre-commit-hooks copied to clipboard
Rust: add support to non-root folder Config.toml
cargo fmt has support to --manifest-path argument, that can be used for passing Config.toml location.
It can be used in this way: cargo fmt --manifest-path my/subdir/Cargo.toml -- --check.
It is useful when your repository contains Cargo.toml in the non-root location.
@AJIOB thanks for the report. PRs are welcome, feel free to open one and I'll be happy to review.
Via a quick search I've found out https://github.com/rust-lang/cargo/issues/7856, please make sure that the behaviour is as you expect.
About a possible guidance, I would add an optional parameter (defaulted to Cargo.toml) in the pretty-format-rust such the change will not be a breaking one, while allowing extension to provide customers to customise the manifest file