-
Notifications
You must be signed in to change notification settings - Fork 121
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
Clippy on ci-flow
with -D warnings
#246
Comments
I think that's really good idea. you can today just override that task, and set the args only. |
Yes, that's what I did, but for the CI flow I thought it's a good idea to actually fail the build on such occasions. And I wanted to hear your thoughts on that. |
I'm thinking of doing something like the following: [env]
CARGO_MAKE_CLIPPY_ALL_FEATURES_WARN = "--all-features -- -D warnings"
CARGO_MAKE_CLIPPY_NO_ARGS = "--all-features -- -D warnings"
CARGO_MAKE_CLIPPY_ARGS = "${CARGO_MAKE_CLIPPY_NO_ARGS}"
[tasks.clippy]
description = "Runs clippy code linter."
category = "Test"
dependencies = [
"install-clippy"
]
command = "cargo"
args = ["clippy", "@@split(CARGO_MAKE_CLIPPY_ARGS, )"] this will basically mean that by default, clippy is invoked without any args like today. [env]
CARGO_MAKE_CLIPPY_ARGS = "${CARGO_MAKE_CLIPPY_ALL_FEATURES_WARN }" in your makefile. [env.ci]
CARGO_MAKE_CLIPPY_ARGS = "${CARGO_MAKE_CLIPPY_ALL_FEATURES_WARN }" and run it cargo make --profile ci |
Sounds good to me. I will try to sit down today and fire a PR 😊 |
actually this one i already developed (i took the example from what i did and tested). |
@sagiegurari when can I expect this to be committed & released, so that I can check it and close this issue? |
i actually pushed it to 0.19.5 branch 2 minutes ago. |
Tested it today. Works perfectly! Thanks! |
thanks for confirming!!! |
Hello,
It's more of a question for discussion whether the
clippy
task should fail on any warnings. Maybe this can also be controlled with an env. variable?E.g.
args = ["clippy", "--all-features", "--", "-D", "warnings"]
The text was updated successfully, but these errors were encountered: