diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 72d8e43430..c3a7845212 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,6 +18,7 @@ on: env: CI: 1 + RUSTFLAGS: "-D warnings" # On PR events, cancel existing CI runs on this same PR for this workflow. concurrency: diff --git a/Cargo.toml b/Cargo.toml index 2b5f598c2c..1c2f3410ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -250,14 +250,17 @@ validator = "0.12" void = "1.0.2" zstd = "0.13.1" +# Note: both rust and clippy lints are warning by default and denied on the CI (see run_tests.py). +# To deny warnings in local dev env: +# - In the terminal: add to .bashrc `export RUSTFLAGS="$RUSTFLAGS -Dwarnings" +# - In vscode, add to settings.json "rust-analyzer.cargo.extraEnv": { "RUSTFLAGS": "-Dwarnings" } [workspace.lints.rust] -future-incompatible = "deny" -nonstandard-style = "deny" -rust-2018-idioms = "deny" +future-incompatible = "warn" +nonstandard-style = "warn" +rust-2018-idioms = "warn" # See [here](https://github.com/taiki-e/cargo-llvm-cov/issues/370) for a discussion on why this is # needed (from rust 1.80). unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] } -warnings = "deny" [workspace.lints.clippy] -as_conversions = "deny" +as_conversions = "warn" diff --git a/scripts/clippy.sh b/scripts/clippy.sh deleted file mode 100755 index 3eaef6844c..0000000000 --- a/scripts/clippy.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# TODO: Revert clippy::unwrap_used to -D after fixing all the unwraps. -cargo clippy --all-targets --all-features $@ -- \ - -D future-incompatible \ - -D nonstandard-style \ - -D rust-2018-idioms \ - -D unused \