build(cargo): specify clippy flags in Cargo.toml
Some checks failed
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline failed

Avoids needing to pass them as parameters whenever we run cargo clippy.
This commit is contained in:
Paul Campbell 2024-05-02 15:00:59 +01:00
parent 31ef0c19fb
commit d42c8fb890
3 changed files with 16 additions and 2 deletions

View file

@ -73,3 +73,9 @@ anyhow = "1.0"
[package.metadata.bin]
# Conventional commits githook
cc-cli = { version = "0.1" }
[lints.clippy]
nursery = "warn"
# pedantic = "warn"
unwrap_used = "warn"
expect_used = "warn"

View file

@ -24,7 +24,15 @@ command = ["cargo", "check", "--all-targets", "--color", "always"]
need_stdout = false
[jobs.clippy]
command = ["cargo", "clippy", "--all-targets", "--color", "always", "--", "-Dwarnings", "-Wclippy::nursery", "-Wclippy::unwrap_used", "-Wclippy::expect_used"]
command = [
"cargo",
"clippy",
"--all-targets",
"--color",
"always",
"--",
"-Dwarnings",
]
# "-Wclippy::pedantic",
need_stdout = false

View file

@ -5,7 +5,7 @@ install-hooks:
validate-dev-branch:
git rebase -i origin/main -x 'cargo build'
git rebase -i origin/main -x 'cargo test'
git rebase -i origin/main -x 'cargo clippy -- -D warnings -W clippy::nursery -W clippy::unwrap_used -W clippy::expect_used'
git rebase -i origin/main -x 'cargo clippy -- -D warnings'
start-ngrok:
#!/usr/bin/env bash