diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-05-08 15:27:56 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-05-10 02:39:28 +0000 |
commit | 2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b (patch) | |
tree | fefaf2c13796f8f2fa9a13b99b09c3b40ab5966b /bin/clippy | |
parent | 00c41c28bbc44b37fc8dcf5d2a5b4679f2aa4297 (diff) | |
parent | 03a54abf852984f696e7a101ff9590f05ebcba5b (diff) | |
download | crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.tar crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.tar.gz crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.tar.bz2 crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.tar.lz crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.tar.xz crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.tar.zst crosvm-2f8d50adc97cc7fca6f710bd575b4f71ccb40f6b.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'bin/clippy')
-rwxr-xr-x | bin/clippy | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/bin/clippy b/bin/clippy index b668875..3adce5f 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,11 @@ SUPPRESS=( # Needed or else clippy won't re-run on code that has already compiled. cargo clean -cargo clippy --all-features -- ${SUPPRESS[@]/#/-Aclippy::} "$@" +# Need to set pass --sysroot for cargo-clippy manually. +# cf. https://github.com/rust-lang/rust-clippy/issues/3523 +RUST_SYSROOT=$(rustc --print sysroot) +RUSTFLAGS="${RUSTFLAGS:-}" +export RUSTFLAGS="$RUSTFLAGS --sysroot=$RUST_SYSROOT" + +cargo clippy --all-features --all-targets -- ${SUPPRESS[@]/#/-Aclippy::} "$@" \ + -D warnings |