Skip to content

Rust: add support to non-root folder Config.toml #210

New issue

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

Closed
AJIOB opened this issue Jan 16, 2024 · 1 comment · Fixed by #217
Closed

Rust: add support to non-root folder Config.toml #210

AJIOB opened this issue Jan 16, 2024 · 1 comment · Fixed by #217

Comments

@AJIOB
Copy link
Contributor

AJIOB commented Jan 16, 2024

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.

@macisamuele
Copy link
Owner

@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 rust-lang/cargo#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants