Skip to content

Commit

Permalink
Ignore more clippy lints at workspace level
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jul 20, 2024
1 parent ac1a094 commit 6cc21f3
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
1 change: 1 addition & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Clippy configuration
# https://doc.rust-lang.org/nightly/clippy/lint_configuration.html

allow-private-module-inception = true
avoid-breaking-exported-api = false
disallowed-names = []
disallowed-macros = [
Expand Down
13 changes: 7 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,13 @@ non_ascii_idents = "warn"
rust_2018_idioms = "warn"
single_use_lifetimes = "warn"
unexpected_cfgs = { level = "warn", check-cfg = [
"cfg(target_arch,values(\"xtensa\"))",
"cfg(target_pointer_width,values(\"128\"))",
'cfg(target_arch,values("xtensa"))',
'cfg(target_pointer_width,values("128"))',
# Known custom cfgs, excluding those that may be set by build script.
# Not public API.
"cfg(portable_atomic_test_outline_atomics_detect_false,qemu,valgrind)",
'cfg(portable_atomic_test_outline_atomics_detect_false,qemu,valgrind)',
# Public APIs, considered unstable unless documented in readme.
"cfg(portable_atomic_no_outline_atomics,portable_atomic_outline_atomics)",
'cfg(portable_atomic_no_outline_atomics,portable_atomic_outline_atomics)',
] }
unreachable_pub = "warn"
# unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV
Expand All @@ -140,12 +140,13 @@ declare_interior_mutable_const = { level = "allow", priority = 1 } # https://git
doc_markdown = { level = "allow", priority = 1 }
float_cmp = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7725
incompatible_msrv = { level = "allow", priority = 1 } # buggy: doesn't consider cfg, https://github.com/rust-lang/rust-clippy/issues/12280, https://github.com/rust-lang/rust-clippy/issues/12257#issuecomment-2093667187
lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12270
lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920
manual_assert = { level = "allow", priority = 1 }
manual_range_contains = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/6455#issuecomment-1225966395
missing_errors_doc = { level = "allow", priority = 1 }
module_name_repetitions = { level = "allow", priority = 1 }
module_name_repetitions = { level = "allow", priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+module_name_repetitions
nonminimal_bool = { level = "allow", priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+nonminimal_bool
range_plus_one = { level = "allow", priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+range_plus_one
similar_names = { level = "allow", priority = 1 }
single_match = { level = "allow", priority = 1 }
single_match_else = { level = "allow", priority = 1 }
Expand Down
6 changes: 3 additions & 3 deletions tests/avr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ resolver = "2"
rust_2018_idioms = "warn"
single_use_lifetimes = "warn"
unexpected_cfgs = { level = "warn", check-cfg = [
"cfg(target_arch,values(\"xtensa\"))",
"cfg(qemu)",
'cfg(target_arch,values("xtensa"))',
'cfg(qemu)',
] }
# unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV
[lints.clippy]
lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12270
lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920

[profile.dev]
lto = true
Expand Down
4 changes: 2 additions & 2 deletions tests/gba/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ resolver = "2"
rust_2018_idioms = "warn"
single_use_lifetimes = "warn"
unexpected_cfgs = { level = "warn", check-cfg = [
"cfg(target_arch,values(\"xtensa\"))",
'cfg(target_arch,values("xtensa"))',
] }
# unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV
[lints.clippy]
lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12270
lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920

[profile.dev]
# TODO: "GBA: Illegal opcode: e7ffdefe" on opt-level=0, GBA hang on opt-level={1,s,z}
Expand Down
4 changes: 2 additions & 2 deletions tests/no-std-qemu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ resolver = "2"
rust_2018_idioms = "warn"
single_use_lifetimes = "warn"
unexpected_cfgs = { level = "warn", check-cfg = [
"cfg(target_arch,values(\"xtensa\"))",
'cfg(target_arch,values("xtensa"))',
] }
# unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV
[lints.clippy]
lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12270
lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920
single_match = { level = "allow", priority = 1 }

[profile.dev]
Expand Down
4 changes: 2 additions & 2 deletions tests/xtensa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ resolver = "2"
rust_2018_idioms = "warn"
single_use_lifetimes = "warn"
unexpected_cfgs = { level = "warn", check-cfg = [
"cfg(target_arch,values(\"xtensa\"))",
'cfg(target_arch,values("xtensa"))',
] }
# unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV
[lints.clippy]
lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12270
lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920

[profile.dev]
opt-level = 'z'
Expand Down

0 comments on commit 6cc21f3

Please sign in to comment.