parent
86da435461
commit
8ddcb81a15
|
@ -1,6 +1,9 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## 0.0.176
|
||||||
|
* Rustup to *rustc 1.24.0-nightly (0077d128d 2017-12-14)*
|
||||||
|
|
||||||
## 0.0.175
|
## 0.0.175
|
||||||
* Rustup to *rustc 1.24.0-nightly (bb42071f6 2017-12-01)*
|
* Rustup to *rustc 1.24.0-nightly (bb42071f6 2017-12-01)*
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "clippy"
|
name = "clippy"
|
||||||
version = "0.0.175"
|
version = "0.0.176"
|
||||||
authors = [
|
authors = [
|
||||||
"Manish Goregaokar <manishsmail@gmail.com>",
|
"Manish Goregaokar <manishsmail@gmail.com>",
|
||||||
"Andre Bogus <bogusandre@gmail.com>",
|
"Andre Bogus <bogusandre@gmail.com>",
|
||||||
|
@ -37,7 +37,7 @@ path = "src/driver.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# begin automatic update
|
# begin automatic update
|
||||||
clippy_lints = { version = "0.0.175", path = "clippy_lints" }
|
clippy_lints = { version = "0.0.176", path = "clippy_lints" }
|
||||||
# end automatic update
|
# end automatic update
|
||||||
cargo_metadata = "0.2"
|
cargo_metadata = "0.2"
|
||||||
regex = "0.2"
|
regex = "0.2"
|
||||||
|
@ -45,7 +45,7 @@ regex = "0.2"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
compiletest_rs = "0.3"
|
compiletest_rs = "0.3"
|
||||||
duct = "0.8.2"
|
duct = "0.8.2"
|
||||||
lazy_static = "0.2"
|
lazy_static = "1.0"
|
||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
clippy-mini-macro-test = { version = "0.1", path = "mini-macro" }
|
clippy-mini-macro-test = { version = "0.1", path = "mini-macro" }
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "clippy_lints"
|
name = "clippy_lints"
|
||||||
# begin automatic update
|
# begin automatic update
|
||||||
version = "0.0.175"
|
version = "0.0.176"
|
||||||
# end automatic update
|
# end automatic update
|
||||||
authors = [
|
authors = [
|
||||||
"Manish Goregaokar <manishsmail@gmail.com>",
|
"Manish Goregaokar <manishsmail@gmail.com>",
|
||||||
|
@ -17,7 +17,7 @@ keywords = ["clippy", "lint", "plugin"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
itertools = "0.6.0"
|
itertools = "0.6.0"
|
||||||
lazy_static = "0.2.8"
|
lazy_static = "1.0"
|
||||||
matches = "0.1.2"
|
matches = "0.1.2"
|
||||||
quine-mc_cluskey = "0.2.2"
|
quine-mc_cluskey = "0.2.2"
|
||||||
regex-syntax = "0.4.0"
|
regex-syntax = "0.4.0"
|
||||||
|
|
|
@ -129,6 +129,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
|
||||||
hir::ItemStatic(..) => "a static",
|
hir::ItemStatic(..) => "a static",
|
||||||
hir::ItemStruct(..) => "a struct",
|
hir::ItemStruct(..) => "a struct",
|
||||||
hir::ItemTrait(..) => "a trait",
|
hir::ItemTrait(..) => "a trait",
|
||||||
|
hir::ItemTraitAlias(..) => "a trait alias",
|
||||||
hir::ItemGlobalAsm(..) => "an assembly blob",
|
hir::ItemGlobalAsm(..) => "an assembly blob",
|
||||||
hir::ItemTy(..) => "a type alias",
|
hir::ItemTy(..) => "a type alias",
|
||||||
hir::ItemUnion(..) => "a union",
|
hir::ItemUnion(..) => "a union",
|
||||||
|
|
|
@ -403,6 +403,9 @@ fn print_item(cx: &LateContext, item: &hir::Item) {
|
||||||
println!("trait is not auto");
|
println!("trait is not auto");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
hir::ItemTraitAlias(..) => {
|
||||||
|
println!("trait alias");
|
||||||
|
}
|
||||||
hir::ItemAutoImpl(_, ref _trait_ref) => {
|
hir::ItemAutoImpl(_, ref _trait_ref) => {
|
||||||
println!("auto impl");
|
println!("auto impl");
|
||||||
},
|
},
|
||||||
|
|
|
@ -940,6 +940,7 @@ pub fn opt_def_id(def: Def) -> Option<DefId> {
|
||||||
Def::StructCtor(id, ..) |
|
Def::StructCtor(id, ..) |
|
||||||
Def::Union(id) |
|
Def::Union(id) |
|
||||||
Def::Trait(id) |
|
Def::Trait(id) |
|
||||||
|
Def::TraitAlias(id) |
|
||||||
Def::Method(id) |
|
Def::Method(id) |
|
||||||
Def::Const(id) |
|
Def::Const(id) |
|
||||||
Def::AssociatedConst(id) |
|
Def::AssociatedConst(id) |
|
||||||
|
|
|
@ -141,10 +141,12 @@ pub fn main() {
|
||||||
let args = std::iter::once(format!("--manifest-path={}", manifest_path)).chain(args);
|
let args = std::iter::once(format!("--manifest-path={}", manifest_path)).chain(args);
|
||||||
if let Some(first) = target.kind.get(0) {
|
if let Some(first) = target.kind.get(0) {
|
||||||
if target.kind.len() > 1 || first.ends_with("lib") {
|
if target.kind.len() > 1 || first.ends_with("lib") {
|
||||||
|
println!("lib: {}", target.name);
|
||||||
if let Err(code) = process(std::iter::once("--lib".to_owned()).chain(args)) {
|
if let Err(code) = process(std::iter::once("--lib".to_owned()).chain(args)) {
|
||||||
std::process::exit(code);
|
std::process::exit(code);
|
||||||
}
|
}
|
||||||
} else if ["bin", "example", "test", "bench"].contains(&&**first) {
|
} else if ["bin", "example", "test", "bench"].contains(&&**first) {
|
||||||
|
println!("{}: {}", first, target.name);
|
||||||
if let Err(code) = process(
|
if let Err(code) = process(
|
||||||
vec![format!("--{}", first), target.name]
|
vec![format!("--{}", first), target.name]
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|
|
@ -72,21 +72,3 @@ fn compile_test() {
|
||||||
run_mode("run-pass", "run-pass");
|
run_mode("run-pass", "run-pass");
|
||||||
run_mode("ui", "ui");
|
run_mode("ui", "ui");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn dogfood() {
|
|
||||||
prepare_env();
|
|
||||||
let files = ["src/main.rs", "src/driver.rs", "src/lib.rs", "clippy_lints/src/lib.rs"];
|
|
||||||
let mut config = config("dogfood", "ui");
|
|
||||||
config.target_rustcflags = config.target_rustcflags.map(|flags| format!("{} -Dclippy -Dclippy_pedantic -Dclippy_internal", flags));
|
|
||||||
|
|
||||||
for file in &files {
|
|
||||||
let paths = test::TestPaths {
|
|
||||||
base: PathBuf::new(),
|
|
||||||
file: PathBuf::from(file),
|
|
||||||
relative_dir: PathBuf::new(),
|
|
||||||
};
|
|
||||||
|
|
||||||
compiletest::runtest::run(config.clone(), &paths);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
#[test]
|
||||||
|
fn dogfood() {
|
||||||
|
let root_dir = std::env::current_dir().unwrap();
|
||||||
|
for d in &[".", "clippy_lints"] {
|
||||||
|
std::env::set_current_dir(root_dir.join(d)).unwrap();
|
||||||
|
let output = std::process::Command::new("cargo")
|
||||||
|
.arg("run")
|
||||||
|
.arg("--bin").arg("cargo-clippy")
|
||||||
|
.arg("--manifest-path").arg(root_dir.join("Cargo.toml"))
|
||||||
|
.output().unwrap();
|
||||||
|
println!("status: {}", output.status);
|
||||||
|
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
|
||||||
|
println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
|
||||||
|
|
||||||
|
assert!(output.status.success());
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue