Skip to content

Commit

Permalink
chore(ci): remove clippy.sh
Browse files Browse the repository at this point in the history
- Only one source of truth for lints, main Cargo.toml, making clippy.sh
  unnecessary.
- Warnings no longer denied, only in the CI. To preserve existing
  behaviors users can add `-Dwarnings` to local RUSTFLAGS.

We still need to enforce in workspace tests that all crates inherit
workspace lints.
  • Loading branch information
Gilad Chase committed Nov 12, 2024
1 parent f82884d commit dfc9bca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 8 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
8 changes: 0 additions & 8 deletions scripts/clippy.sh

This file was deleted.

0 comments on commit dfc9bca

Please sign in to comment.