crosvm/.cargo/config.toml
Dennis Kempin 33d5aa219a Enable clippy for android code
This change enables clippy builds of android specific code.

Doing so without adding the full Android SDK into our container
is a bit hacky. The CL https://crrev.com/c/5671653 adds env variables
to the minijail build.rs to allow us to skip building the library, and
generate bindings for linux instead of android.

This allow us to build all non-gpu related features of the
android build. It will not link, but it will run clippy.

This CL fixes various clippy issues that come up in this new
configuration

BUG=b:349907813
TEST=tools/clippy -p android
TEST=tools/presubmit clippy_android

Change-Id: I1f51d383051bbeeeff55d716feb7b56c3e24588b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5672567
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2024-07-09 20:43:44 +00:00

32 lines
1.1 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
[build]
rustflags = [
# We don't care about these lints. Okay to remain suppressed globally.
"-Aclippy::bool_assert_comparison",
"-Aclippy::cast_lossless",
"-Aclippy::cognitive_complexity",
"-Aclippy::collapsible_if",
"-Aclippy::enum_variant_names",
"-Aclippy::identity_op",
"-Aclippy::match_bool",
"-Aclippy::match_wild_err_arm",
"-Aclippy::needless_bool",
"-Aclippy::new-ret-no-self",
"-Aclippy::or_fun_call",
"-Aclippy::result_large_err",
"-Aclippy::result-unit-err",
"-Aclippy::should_implement_trait",
"-Aclippy::single_char_pattern",
"-Aclippy::single-range-in-vec-init",
"-Aclippy::too_many_arguments",
"-Aclippy::trivially_copy_pass_by_ref",
"-Aclippy::type_complexity",
"-Aclippy::unreadable_literal",
"-Aclippy::useless_let_if_seq",
"-Aclippy::useless_transmute",
"-Dclippy::undocumented_unsafe_blocks",
]