-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Allow turning Cargo.toml
warnings into errors
#2568
Comments
Sounds plausible to me! Right now we definitely don't indicate via the exit code anything about warnings, but we do so for errors! I'd be fine adding a dedicated command the specifically checked the syntax with perhaps more helpful error messages and more info communicated in the error code. |
#12115 will unblock cargo having lint levels which would allow failing on different warnings |
Cargo.toml
warnings into errors
I would really love this option. As a maintainer of a big open source repository, PRs often get merged that introduce Cargo warnings like the one stated in this post. It's very annoying to have to go back and fix the issues each time. I'd like to be able to configure my CI to fail on Cargo warnings. |
Lost track of this issue. We ended up creating #12235 which has more discussion, so I'm closing in favor of that other issue. |
subcommand to lint format of Cargo file
and an option for all commands to fail early if format is invalid
I have not found an actual usecase to justify this
but have been learning rust and maybe this will be useful for noobs to double-check
the smallest valid
Cargo.toml
file isnow let us say we leave out the name.
cargo build
will throw an errorwill throw a warning for unused keys as well
warning "unused manifest key: package.users"
but exit status is zero and everything works
also no error is thrown for an unused section. example:
should have been
dependencies
rather thandependency
abovePS: I have been using
cargo build
for all these examples.but am not sure, if the config is checked for unused params by each sub-command
The text was updated successfully, but these errors were encountered: