-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into rustup
- Loading branch information
Showing
170 changed files
with
3,132 additions
and
969 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
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)); | ||
} |
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
Oops, something went wrong.