forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#99406 - flip1995:clippyup, r=Manishearth
Update Clippy
- Loading branch information
Showing
165 changed files
with
3,408 additions
and
944 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Clippy Book | ||
|
||
This is the source for the Clippy Book. See the | ||
[book](src/infrastructure/book.md) for more information. | ||
[book](src/development/infrastructure/book.md) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
use crate::clippy_project_root; | ||
use std::process::Command; | ||
|
||
/// # Panics | ||
/// | ||
/// Panics if unable to run the dogfood test | ||
pub fn dogfood(fix: bool, allow_dirty: bool, allow_staged: bool) { | ||
let mut cmd = Command::new("cargo"); | ||
|
||
cmd.current_dir(clippy_project_root()) | ||
.args(["test", "--test", "dogfood"]) | ||
.args(["--features", "internal"]) | ||
.args(["--", "dogfood_clippy"]); | ||
|
||
let mut dogfood_args = Vec::new(); | ||
if fix { | ||
dogfood_args.push("--fix"); | ||
} | ||
|
||
if allow_dirty { | ||
dogfood_args.push("--allow-dirty"); | ||
} | ||
|
||
if allow_staged { | ||
dogfood_args.push("--allow-staged"); | ||
} | ||
|
||
cmd.env("__CLIPPY_DOGFOOD_ARGS", dogfood_args.join(" ")); | ||
|
||
let output = cmd.output().expect("failed to run command"); | ||
|
||
println!("{}", String::from_utf8_lossy(&output.stdout)); | ||
} |
Oops, something went wrong.