mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
add clippy::
This commit is contained in:
parent
7cd4a94db8
commit
dad9fe6618
@ -1,5 +1,5 @@
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))] // large project
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(redundant_closure))] // there's a false positive
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::too_many_arguments))] // large project
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::redundant_closure))] // there's a false positive
|
||||
|
||||
extern crate cargo;
|
||||
extern crate clap;
|
||||
@ -13,10 +13,10 @@ extern crate serde_derive;
|
||||
extern crate serde_json;
|
||||
extern crate toml;
|
||||
|
||||
use std::collections::BTreeSet;
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::collections::BTreeSet;
|
||||
|
||||
use cargo::core::shell::Shell;
|
||||
use cargo::util::{self, command_prelude, lev_distance, CargoResult, CliResult, Config};
|
||||
|
@ -1,18 +1,17 @@
|
||||
#![cfg_attr(test, deny(warnings))]
|
||||
|
||||
// Clippy isn't enforced by CI, and know that @alexcrichton isn't a fan :)
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(boxed_local))] // bug rust-lang-nursery/rust-clippy#1123
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(cyclomatic_complexity))] // large project
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(derive_hash_xor_eq))] // there's an intentional incoherence
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(explicit_into_iter_loop))] // explicit loops are clearer
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(explicit_iter_loop))] // explicit loops are clearer
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(identity_op))] // used for vertical alignment
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(implicit_hasher))] // large project
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(large_enum_variant))] // large project
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(redundant_closure_call))] // closures over try catch blocks
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))] // large project
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(type_complexity))] // there's an exceptionally complex type
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(wrong_self_convention))] // perhaps Rc should be special cased in Clippy?
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::boxed_local))] // bug rust-lang-nursery/rust-clippy#1123
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::cyclomatic_complexity))] // large project
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::derive_hash_xor_eq))] // there's an intentional incoherence
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::explicit_into_iter_loop))] // explicit loops are clearer
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::explicit_iter_loop))] // explicit loops are clearer
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::identity_op))] // used for vertical alignment
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::implicit_hasher))] // large project
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::large_enum_variant))] // large project
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::redundant_closure_call))] // closures over try catch blocks
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::too_many_arguments))] // large project
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::type_complexity))] // there's an exceptionally complex type
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::wrong_self_convention))] // perhaps Rc should be special cased in Clippy?
|
||||
|
||||
extern crate atty;
|
||||
extern crate bytesize;
|
||||
@ -55,6 +54,7 @@ extern crate serde_derive;
|
||||
extern crate serde_ignored;
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
extern crate im_rc;
|
||||
extern crate shell_escape;
|
||||
extern crate tar;
|
||||
extern crate tempfile;
|
||||
@ -62,18 +62,17 @@ extern crate termcolor;
|
||||
extern crate toml;
|
||||
extern crate unicode_width;
|
||||
extern crate url;
|
||||
extern crate im_rc;
|
||||
|
||||
use std::fmt;
|
||||
|
||||
use serde::ser;
|
||||
use failure::Error;
|
||||
use serde::ser;
|
||||
|
||||
use core::Shell;
|
||||
use core::shell::Verbosity::Verbose;
|
||||
use core::Shell;
|
||||
|
||||
pub use util::{CargoError, CargoResult, CliError, CliResult, Config};
|
||||
pub use util::errors::Internal;
|
||||
pub use util::{CargoError, CargoResult, CliError, CliResult, Config};
|
||||
|
||||
pub const CARGO_ENV: &str = "CARGO";
|
||||
|
||||
@ -210,7 +209,9 @@ fn handle_cause(cargo_err: &Error, shell: &mut Shell) -> bool {
|
||||
|
||||
pub fn version() -> VersionInfo {
|
||||
macro_rules! option_env_str {
|
||||
($name:expr) => { option_env!($name).map(|s| s.to_string()) }
|
||||
($name:expr) => {
|
||||
option_env!($name).map(|s| s.to_string())
|
||||
};
|
||||
}
|
||||
|
||||
// So this is pretty horrible...
|
||||
|
Loading…
x
Reference in New Issue
Block a user