Skip to content

Commit 1ebaae8

Browse files
committed
lintcheck: make download path and source path consts, move source directory from traget/lintcheck/crates to target/lintcheck/sources
also update logfile with the dtolnay crates
1 parent 70d952e commit 1ebaae8

File tree

2 files changed

+59
-16
lines changed

2 files changed

+59
-16
lines changed

clippy_dev/src/lintcheck.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ use serde_json::Value;
2222
const CLIPPY_DRIVER_PATH: &str = "target/debug/clippy-driver";
2323
const CARGO_CLIPPY_PATH: &str = "target/debug/cargo-clippy";
2424

25+
const LINTCHECK_DOWNLOADS: &str = "target/lintcheck/downloads";
26+
const LINTCHECK_SOURCES: &str = "target/lintcheck/sources";
27+
2528
/// List of sources to check, loaded from a .toml file
2629
#[derive(Debug, Serialize, Deserialize)]
2730
struct SourceList {
@@ -102,8 +105,8 @@ impl CrateSource {
102105
fn download_and_extract(&self) -> Crate {
103106
match self {
104107
CrateSource::CratesIo { name, version, options } => {
105-
let extract_dir = PathBuf::from("target/lintcheck/crates");
106-
let krate_download_dir = PathBuf::from("target/lintcheck/downloads");
108+
let extract_dir = PathBuf::from(LINTCHECK_SOURCES);
109+
let krate_download_dir = PathBuf::from(LINTCHECK_DOWNLOADS);
107110

108111
// url to download the crate from crates.io
109112
let url = format!("https://crates.io/api/v1/crates/{}/{}/download", name, version);
@@ -143,7 +146,7 @@ impl CrateSource {
143146
options,
144147
} => {
145148
let repo_path = {
146-
let mut repo_path = PathBuf::from("target/lintcheck/crates");
149+
let mut repo_path = PathBuf::from(LINTCHECK_SOURCES);
147150
// add a -git suffix in case we have the same crate from crates.io and a git repo
148151
repo_path.push(format!("{}-git", name));
149152
repo_path
@@ -185,7 +188,7 @@ impl CrateSource {
185188
use fs_extra::dir;
186189

187190
// simply copy the entire directory into our target dir
188-
let copy_dest = PathBuf::from("target/lintcheck/crates/");
191+
let copy_dest = PathBuf::from(format!("{}/", LINTCHECK_SOURCES));
189192

190193
// the source path of the crate we copied, ${copy_dest}/crate_name
191194
let crate_root = copy_dest.join(name); // .../crates/local_crate

lintcheck-logs/lintcheck_crates_logs.txt

Lines changed: 52 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
1-
clippy 0.1.52 (e3386041a 2021-02-28)
1+
clippy 0.1.52 (70d952e75 2021-02-28)
22

3+
target/lintcheck/sources/anyhow-1.0.38/build.rs:1:null clippy::cargo_common_metadata "package `anyhow` is missing `package.keywords` metadata"
4+
target/lintcheck/sources/anyhow-1.0.38/src/error.rs:350:5 clippy::missing_panics_doc "docs for function which may panic missing `# Panics` section"
5+
target/lintcheck/sources/anyhow-1.0.38/src/lib.rs:1:null clippy::cargo_common_metadata "package `anyhow` is missing `package.keywords` metadata"
6+
target/lintcheck/sources/async-trait-0.1.42/src/expand.rs:130:1 clippy::too_many_lines "this function has too many lines (104/100)"
7+
target/lintcheck/sources/async-trait-0.1.42/src/expand.rs:156:26 clippy::default_trait_access "calling `syn::token::Where::default()` is more clear than this expression"
8+
target/lintcheck/sources/async-trait-0.1.42/src/expand.rs:259:1 clippy::too_many_lines "this function has too many lines (204/100)"
9+
target/lintcheck/sources/async-trait-0.1.42/src/expand.rs:414:35 clippy::shadow_unrelated "`generics` is being shadowed"
10+
target/lintcheck/sources/async-trait-0.1.42/src/expand.rs:464:32 clippy::if_not_else "unnecessary `!=` operation"
11+
target/lintcheck/sources/async-trait-0.1.42/src/lib.rs:102:7 clippy::doc_markdown "you should put `async_trait` between ticks in the documentation"
12+
target/lintcheck/sources/async-trait-0.1.42/src/lib.rs:159:64 clippy::doc_markdown "you should put `async_trait` between ticks in the documentation"
13+
target/lintcheck/sources/async-trait-0.1.42/src/lib.rs:1:null clippy::cargo_common_metadata "package `async-trait` is missing `package.categories` metadata"
14+
target/lintcheck/sources/async-trait-0.1.42/src/lib.rs:1:null clippy::cargo_common_metadata "package `async-trait` is missing `package.keywords` metadata"
15+
target/lintcheck/sources/async-trait-0.1.42/src/lib.rs:240:15 clippy::doc_markdown "you should put `async_trait` between ticks in the documentation"
16+
target/lintcheck/sources/async-trait-0.1.42/src/lifetime.rs:5:1 clippy::module_name_repetitions "item name ends with its containing module's name"
17+
target/lintcheck/sources/async-trait-0.1.42/src/receiver.rs:102:34 clippy::similar_names "binding's name is too similar to existing binding"
18+
target/lintcheck/sources/async-trait-0.1.42/src/receiver.rs:107:29 clippy::similar_names "binding's name is too similar to existing binding"
19+
target/lintcheck/sources/async-trait-0.1.42/src/receiver.rs:137:38 clippy::default_trait_access "calling `syn::token::Colon2::default()` is more clear than this expression"
20+
target/lintcheck/sources/async-trait-0.1.42/src/receiver.rs:162:55 clippy::default_trait_access "calling `syn::token::Colon2::default()` is more clear than this expression"
21+
target/lintcheck/sources/async-trait-0.1.42/src/receiver.rs:167:42 clippy::default_trait_access "calling `syn::token::Colon2::default()` is more clear than this expression"
22+
target/lintcheck/sources/async-trait-0.1.42/src/receiver.rs:73:1 clippy::module_name_repetitions "item name ends with its containing module's name"
23+
target/lintcheck/sources/async-trait-0.1.42/src/receiver.rs:97:34 clippy::similar_names "binding's name is too similar to existing binding"
324
target/lintcheck/sources/cargo-0.49.0/build.rs:1:null clippy::cargo_common_metadata "package `cargo` is missing `package.categories` metadata"
425
target/lintcheck/sources/cargo-0.49.0/build.rs:1:null clippy::cargo_common_metadata "package `cargo` is missing `package.keywords` metadata"
526
target/lintcheck/sources/cargo-0.49.0/src/bin/cargo/cli.rs:104:34 clippy::single_match_else "you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`"
@@ -1427,6 +1448,23 @@ target/lintcheck/sources/cargo-0.49.0/src/cargo/util/workspace.rs:52:1 clippy::m
14271448
target/lintcheck/sources/cargo-0.49.0/src/cargo/util/workspace.rs:56:1 clippy::missing_errors_doc "docs for function returning `Result` missing `# Errors` section"
14281449
target/lintcheck/sources/cargo-0.49.0/src/cargo/util/workspace.rs:60:1 clippy::missing_errors_doc "docs for function returning `Result` missing `# Errors` section"
14291450
target/lintcheck/sources/cargo-0.49.0/src/cargo/util/workspace.rs:64:1 clippy::missing_errors_doc "docs for function returning `Result` missing `# Errors` section"
1451+
target/lintcheck/sources/cxx-1.0.32/src/rust_string.rs:15:20 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
1452+
target/lintcheck/sources/cxx-1.0.32/src/rust_string.rs:19:24 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
1453+
target/lintcheck/sources/cxx-1.0.32/src/rust_vec.rs:21:20 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
1454+
target/lintcheck/sources/cxx-1.0.32/src/rust_vec.rs:25:24 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
1455+
target/lintcheck/sources/cxx-1.0.32/src/rust_vec.rs:74:35 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
1456+
target/lintcheck/sources/cxx-1.0.32/src/rust_vec.rs:78:39 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
1457+
target/lintcheck/sources/cxx-1.0.32/src/rust_vec.rs:90:20 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
1458+
target/lintcheck/sources/cxx-1.0.32/src/rust_vec.rs:94:24 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
1459+
target/lintcheck/sources/cxx-1.0.32/src/shared_ptr.rs:108:20 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
1460+
target/lintcheck/sources/cxx-1.0.32/src/shared_ptr.rs:165:9 clippy::let_underscore_drop "non-binding `let` on a type that implements `Drop`"
1461+
target/lintcheck/sources/cxx-1.0.32/src/shared_ptr.rs:54:20 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
1462+
target/lintcheck/sources/cxx-1.0.32/src/shared_ptr.rs:62:20 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
1463+
target/lintcheck/sources/cxx-1.0.32/src/shared_ptr.rs:75:20 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
1464+
target/lintcheck/sources/cxx-1.0.32/src/unique_ptr.rs:185:9 clippy::let_underscore_drop "non-binding `let` on a type that implements `Drop`"
1465+
target/lintcheck/sources/cxx-1.0.32/src/unwind.rs:22:5 clippy::let_underscore_drop "non-binding `let` on a type that implements `Drop`"
1466+
target/lintcheck/sources/cxx-1.0.32/src/weak_ptr.rs:47:20 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
1467+
target/lintcheck/sources/cxx-1.0.32/src/weak_ptr.rs:80:20 clippy::ptr_as_ptr "`as` casting between raw pointers without changing its mutability"
14301468
target/lintcheck/sources/iron-0.6.1/src/error.rs:24:1 clippy::module_name_repetitions "item name ends with its containing module's name"
14311469
target/lintcheck/sources/iron-0.6.1/src/iron.rs:105:13 clippy::redundant_field_names "redundant field names in struct initialization"
14321470
target/lintcheck/sources/iron-0.6.1/src/iron.rs:119:5 clippy::missing_errors_doc "docs for function returning `Result` missing `# Errors` section"
@@ -3176,12 +3214,14 @@ target/lintcheck/sources/serde-1.0.118/src/de/mod.rs:1638:9 clippy::let_undersco
31763214
target/lintcheck/sources/serde-1.0.118/src/de/mod.rs:1649:9 clippy::let_underscore_drop "non-binding `let` on a type that implements `Drop`"
31773215
target/lintcheck/sources/serde-1.0.118/src/de/mod.rs:952:13 clippy::let_underscore_drop "non-binding `let` on a type that implements `Drop`"
31783216
target/lintcheck/sources/serde-1.0.118/src/de/mod.rs:986:13 clippy::let_underscore_drop "non-binding `let` on a type that implements `Drop`"
3217+
target/lintcheck/sources/serde_yaml-0.8.17/src/lib.rs:1:null clippy::cargo_common_metadata "package `serde_yaml` is missing `package.categories` metadata"
31793218
target/lintcheck/sources/syn-1.0.54/build.rs:1:null clippy::cargo_common_metadata "package `syn` is missing `package.keywords` metadata"
31803219
target/lintcheck/sources/syn-1.0.54/src/lib.rs:1:null clippy::cargo_common_metadata "package `syn` is missing `package.keywords` metadata"
31813220
target/lintcheck/sources/syn-1.0.54/src/lit.rs:1397:40 clippy::redundant_else "redundant else block"
31823221
target/lintcheck/sources/syn-1.0.54/src/lit.rs:1405:28 clippy::redundant_else "redundant else block"
31833222
target/lintcheck/sources/syn-1.0.54/src/lit.rs:1485:32 clippy::redundant_else "redundant else block"
31843223
target/lintcheck/sources/syn-1.0.54/src/token.rs:974:5 clippy::missing_panics_doc "docs for function which may panic missing `# Panics` section"
3224+
target/lintcheck/sources/thiserror-1.0.24/src/lib.rs:1:null clippy::cargo_common_metadata "package `thiserror` is missing `package.keywords` metadata"
31853225
target/lintcheck/sources/unicode-xid-0.2.1/src/lib.rs:1:null clippy::cargo_common_metadata "package `unicode-xid` is missing `package.categories` metadata"
31863226
target/lintcheck/sources/unicode-xid-0.2.1/src/lib.rs:57:64 clippy::doc_markdown "you should put `XID_Start` between ticks in the documentation"
31873227
target/lintcheck/sources/unicode-xid-0.2.1/src/lib.rs:60:10 clippy::doc_markdown "you should put `XID_Start` between ticks in the documentation"
@@ -3426,7 +3466,6 @@ clippy::len_without_is_empty 5
34263466
clippy::match_like_matches_macro 5
34273467
clippy::needless_return 5
34283468
clippy::new_without_default 5
3429-
clippy::ptr_as_ptr 5
34303469
clippy::collapsible_else_if 6
34313470
clippy::manual_strip 6
34323471
clippy::non_ascii_literal 6
@@ -3446,42 +3485,43 @@ clippy::match_wildcard_for_single_variants 10
34463485
clippy::missing_safety_doc 10
34473486
clippy::needless_doctest_main 10
34483487
clippy::needless_lifetimes 12
3449-
clippy::cargo_common_metadata 13
3450-
clippy::shadow_unrelated 13
34513488
clippy::linkedlist 14
3489+
clippy::shadow_unrelated 14
34523490
clippy::single_char_add_str 14
34533491
clippy::option_if_let_else 15
34543492
clippy::needless_pass_by_value 18
3493+
clippy::cargo_common_metadata 19
34553494
clippy::cast_possible_wrap 19
34563495
clippy::cast_sign_loss 19
3496+
clippy::ptr_as_ptr 19
34573497
clippy::unnecessary_wraps 19
34583498
clippy::unused_self 19
34593499
clippy::unusual_byte_groupings 19
34603500
clippy::map_unwrap_or 20
34613501
clippy::struct_excessive_bools 20
34623502
clippy::redundant_static_lifetimes 21
3463-
clippy::default_trait_access 22
34643503
clippy::cast_lossless 23
3465-
clippy::let_underscore_drop 23
3504+
clippy::default_trait_access 26
3505+
clippy::let_underscore_drop 26
34663506
clippy::trivially_copy_pass_by_ref 26
34673507
clippy::redundant_else 29
3468-
clippy::too_many_lines 32
3469-
clippy::if_not_else 35
3508+
clippy::too_many_lines 34
3509+
clippy::if_not_else 36
34703510
clippy::enum_glob_use 40
34713511
clippy::unseparated_literal_suffix 41
34723512
clippy::cast_precision_loss 44
34733513
clippy::single_match_else 45
3474-
clippy::missing_panics_doc 56
3514+
clippy::missing_panics_doc 57
34753515
clippy::inline_always 59
34763516
clippy::match_same_arms 60
3477-
clippy::similar_names 78
3517+
clippy::similar_names 81
34783518
clippy::cast_possible_truncation 95
34793519
clippy::redundant_field_names 111
34803520
clippy::redundant_closure_for_method_calls 135
34813521
clippy::items_after_statements 139
3482-
clippy::module_name_repetitions 142
3522+
clippy::module_name_repetitions 144
34833523
clippy::wildcard_imports 163
3484-
clippy::doc_markdown 178
3524+
clippy::doc_markdown 181
34853525
clippy::missing_errors_doc 343
34863526
clippy::unreadable_literal 365
34873527
clippy::must_use_candidate 565

0 commit comments

Comments
 (0)