mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 13:23:08 +00:00
afef8d7baf
Fix the last instance of this clippy warning: warning: passing a unit value to a function ... and remove this warning from the "To be resolved" list in bin/clippy. BUG=None TEST=bin/clippy passes without warnings Change-Id: Ic1d558e935366d80eeadb96bf1ff951ce50edd5b Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1766623 Reviewed-by: Dylan Reid <dgreid@chromium.org> Reviewed-by: Tomasz Jeznach <tjeznach@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com>
52 lines
1.2 KiB
Bash
Executable file
52 lines
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# Copyright 2019 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
# Run `cargo clippy` on all Rust code in crosvm with a mindful set of lints
|
|
# suppressed.
|
|
|
|
set -euo pipefail
|
|
|
|
# Change into directory of script, which is crosvm/bin.
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
|
|
# Jump up to root directory of crosvm repo.
|
|
cd ..
|
|
|
|
SUPPRESS=(
|
|
# To be resolved.
|
|
let_unit_value
|
|
question_mark
|
|
range_plus_one
|
|
|
|
# We don't care about these lints. Okay to remain suppressed globally.
|
|
blacklisted_name
|
|
cast_lossless
|
|
cognitive_complexity
|
|
enum_variant_names
|
|
identity_op
|
|
len_without_is_empty
|
|
len_zero
|
|
match_bool
|
|
match_wild_err_arm
|
|
module_inception
|
|
needless_bool
|
|
new_without_default
|
|
or_fun_call
|
|
should_implement_trait
|
|
single_char_pattern
|
|
too_many_arguments
|
|
transmute_ptr_to_ptr
|
|
trivially_copy_pass_by_ref
|
|
type_complexity
|
|
unreadable_literal
|
|
useless_let_if_seq
|
|
useless_transmute
|
|
)
|
|
|
|
# Needed or else clippy won't re-run on code that has already compiled.
|
|
cargo clean
|
|
|
|
cargo clippy --all-features -- ${SUPPRESS[@]/#/-Aclippy::} "$@"
|