crosvm/.cargo/config.toml
Dennis Kempin c3dedf3cc1 cleanup: Fix previously disabled clippy checks
There were not too many cases here. This fixes:

- comparison_chain
- wrong_self_convention
- upper_case_acronyms
- from_over_into
- let-and-return

The collapsible_if check is moved to the permanently
allowed checks. The cases we do have improve
readability or semantics.

BUG=chromium:908640
TEST=Kokoro

Change-Id: I6e905d08e2a87aa0862d4d1cf5ff57b60e95fa7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3278776
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-11-12 23:23:48 +00:00

41 lines
1.4 KiB
TOML

# Disable clippy lints project-wide.
# This allows ./tools/clippy and IDE integrations to use the same configuration.
# This should be replaced with a proper clippy config once available:
# https://github.com/rust-lang/cargo/issues/5034
[target.'cfg(all())']
rustflags = [
# TODO(b/181763000): Fail builds on warnings
# "-Dwarnings",
# TODO(crbug/908640): To be resolved.
"-Aclippy::missing_safety_doc", # 26 errors
# False positives affecting WlVfd @ `devices/src/virtio/wl.rs`.
# Bug: https://github.com/rust-lang/rust-clippy/issues/6312
"-Aclippy::field_reassign_with_default",
# We don't care about these lints. Okay to remain suppressed globally.
"-Aclippy::cast_lossless",
"-Aclippy::cognitive_complexity",
"-Aclippy::enum_variant_names",
"-Aclippy::identity_op",
"-Aclippy::len_without_is_empty",
"-Aclippy::len_zero",
"-Aclippy::match_bool",
"-Aclippy::match_wild_err_arm",
"-Aclippy::module_inception",
"-Aclippy::needless_bool",
"-Aclippy::new_without_default",
"-Aclippy::or_fun_call",
"-Aclippy::should_implement_trait",
"-Aclippy::single_char_pattern",
"-Aclippy::too_many_arguments",
"-Aclippy::trivially_copy_pass_by_ref",
"-Aclippy::type_complexity",
"-Aclippy::unreadable_literal",
"-Aclippy::useless_let_if_seq",
"-Aclippy::useless_transmute",
"-Aclippy::new-ret-no-self",
"-Aclippy::result-unit-err",
"-Aclippy::collapsible_if",
]