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 Aug 23, 2024
1 parent c0b517b commit 5966a6a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ undocumented_unsafe_blocks = "warn"
# Suppress buggy or noisy clippy lints
bool_assert_comparison = { level = "allow", priority = 1 }
borrow_as_ptr = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/8286
cast_lossless = { level = "allow", priority = 1 } # https://godbolt.org/z/Pv6vbGG6E
declare_interior_mutable_const = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7665
doc_markdown = { level = "allow", priority = 1 }
float_cmp = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7725
Expand All @@ -80,6 +81,7 @@ 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 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+module_name_repetitions
naive_bytecount = { level = "allow", priority = 1 }
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 }
Expand All @@ -90,6 +92,7 @@ struct_field_names = { level = "allow", priority = 1 }
too_many_arguments = { level = "allow", priority = 1 }
too_many_lines = { level = "allow", priority = 1 }
type_complexity = { level = "allow", priority = 1 }
unreadable_literal = { level = "allow", priority = 1 }

[profile.release]
codegen-units = 1
Expand Down
28 changes: 12 additions & 16 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,10 @@ fn determine_kind<'a>(
} else {
// See exec_on_package
let feature_count = features.len()
+ usize::from(!cx.exclude_no_default_features)
+ usize::from(
!(cx.exclude_all_features
|| pkg_features.optional_deps().is_empty()
&& pkg_features.normal().len() <= 1),
);
+ (!cx.exclude_no_default_features) as usize
+ (!(cx.exclude_all_features
|| pkg_features.optional_deps().is_empty() && pkg_features.normal().len() <= 1))
as usize;
let kind = Kind::Each { features };
Some(PackageRuns { id, kind, feature_count })
}
Expand All @@ -305,16 +303,14 @@ fn determine_kind<'a>(
} else {
// See exec_on_package
let feature_count = features.len()
+ usize::from(!cx.exclude_no_default_features)
+ usize::from(
!(cx.exclude_all_features
|| (pkg_features.optional_deps().is_empty()
|| match &cx.optional_deps {
// Skip when all optional deps are already included in powerset
Some(opt_deps) => opt_deps.is_empty(),
None => false,
})),
);
+ (!cx.exclude_no_default_features) as usize
+ (!(cx.exclude_all_features
|| (pkg_features.optional_deps().is_empty()
|| match &cx.optional_deps {
// Skip when all optional deps are already included in powerset
Some(opt_deps) => opt_deps.is_empty(),
None => false,
}))) as usize;
let kind = Kind::Powerset { features };
Some(PackageRuns { id, kind, feature_count })
}
Expand Down

0 comments on commit 5966a6a

Please sign in to comment.