summary refs log tree commit diff
path: root/bin/clippy
diff options
context:
space:
mode:
authorKeiichi Watanabe <keiichiw@chromium.org>2020-04-10 21:43:45 +0900
committerCommit Bot <commit-bot@chromium.org>2020-04-15 18:01:34 +0000
commit40af8ee7482daa49f775963c983fbfc1afeb2006 (patch)
treeb0cd28cabc58a1e49228d23c43616f5fd5eff91a /bin/clippy
parent05489a7637c10232e759ce3885e860a4f8d2d1be (diff)
downloadcrosvm-40af8ee7482daa49f775963c983fbfc1afeb2006.tar
crosvm-40af8ee7482daa49f775963c983fbfc1afeb2006.tar.gz
crosvm-40af8ee7482daa49f775963c983fbfc1afeb2006.tar.bz2
crosvm-40af8ee7482daa49f775963c983fbfc1afeb2006.tar.lz
crosvm-40af8ee7482daa49f775963c983fbfc1afeb2006.tar.xz
crosvm-40af8ee7482daa49f775963c983fbfc1afeb2006.tar.zst
crosvm-40af8ee7482daa49f775963c983fbfc1afeb2006.zip
crosvm: Enable cargo clippy in smoke_test
Enable cargo clippy in the smoke test script for kokoro with many whitelisted rules
to be resolved. This check will reject compile warnings as well.

Also, this CL removes cargo check in Docker.crosvm as cargo clippy is a superset of
cargo check.

BUG=chromium:908640
TEST=./wrapped_smoke_test.sh

Change-Id: Iaa546fc0166e3d9762c5e91144d036725d38b0f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2145538
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'bin/clippy')
-rwxr-xr-xbin/clippy28
1 files changed, 26 insertions, 2 deletions
diff --git a/bin/clippy b/bin/clippy
index 66df660..6631f26 100755
--- a/bin/clippy
+++ b/bin/clippy
@@ -16,10 +16,33 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
 cd ..
 
 SUPPRESS=(
-    # To be resolved.
+    # TODO(crbug/908640): To be resolved.
+    borrowed_box
+    char_lit_as_u8
+    clone_on_copy
+    collapsible_if
+    comparison_chain
+    extra_unused_lifetimes
+    for_kv_map
+    inefficient_to_string
+    into_iter_on_ref
     let_unit_value
+    missing_safety_doc
+    needless_doctest_main
+    needless_range_loop
+    needless_return
+    option_map_unit_fn
     question_mark
     range_plus_one
+    redundant_clone
+    redundant_closure
+    single_match
+    slow_vector_initialization
+    unnecessary_filter_map
+    unnecessary_mut_passed
+    unneeded_field_pattern
+    useless_format
+    wrong_self_convention
 
     # We don't care about these lints. Okay to remain suppressed globally.
     blacklisted_name
@@ -49,4 +72,5 @@ SUPPRESS=(
 # Needed or else clippy won't re-run on code that has already compiled.
 cargo clean
 
-cargo clippy --all-features -- ${SUPPRESS[@]/#/-Aclippy::} "$@"
+cargo clippy --all-features --all-targets -- ${SUPPRESS[@]/#/-Aclippy::} "$@" \
+      -D warnings