-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] enable non_exhaustive_omitted_patterns lint with a nightly check (…
…#358) This lint is useful to detect missed match statements. Also add a Justfile to make this easy to run.
- Loading branch information
1 parent
af3505d
commit 5a5a486
Showing
9 changed files
with
69 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Extra configuration for nightly Rust. | ||
# | ||
# Use manually by passing this path into `--config`, or via the Justfile: `just | ||
# nightly check` or `just bootstrap check`. | ||
|
||
[build] | ||
# Detect if non-exhaustive patterns are missing: | ||
# https://github.com/rust-lang/rust/issues/89554 | ||
# | ||
# To allow this lint for some statements, use | ||
# `#[cfg_attr(guppy_nightly, expect(non_exhaustive_omitted_patterns))]`. | ||
rustflags = [ | ||
"--warn", | ||
"non_exhaustive_omitted_patterns", | ||
"-Zcrate-attr=feature(non_exhaustive_omitted_patterns_lint)", | ||
"--cfg", | ||
"guppy_nightly", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Note: help messages should be 1 line long as required by just. | ||
|
||
# Print a help message. | ||
help: | ||
just --list | ||
|
||
# Run the nightly check command: `just nightly check` or `just nightly clippy --fix` | ||
nightly arg1 *args: | ||
cargo +nightly {{arg1}} {{args}} --all-features --all-targets --config .cargo/nightly-config.toml | ||
|
||
# Run with nightly features enabled: `just bootstrap check`, `just bootstrap +beta clippy` | ||
bootstrap arg1 *args: | ||
RUSTC_BOOTSTRAP=1 cargo {{arg1}} {{args}} --all-features --all-targets --config .cargo/nightly-config.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters