-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
280 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/target |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,9 @@ | ||
[package] | ||
name = "check_diff" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
clap = { version = "4.4.2", features = ["derive"] } |
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,25 @@ | ||
use clap::Parser; | ||
/// Inputs for the check_diff script | ||
#[derive(Parser)] | ||
struct CliInputs { | ||
/// Git url of a rustfmt fork to compare against the latest master rustfmt | ||
remote_repo_url: String, | ||
/// Name of the feature branch on the forked repo | ||
feature_branch: String, | ||
/// Optional commit hash from the feature branch | ||
#[arg(short, long)] | ||
commit_hash: Option<String>, | ||
/// Optional comma separated list of rustfmt config options to | ||
/// pass when running the feature branch | ||
#[arg(value_delimiter = ',', short, long, num_args = 1..)] | ||
rustfmt_config: Option<Vec<String>>, | ||
} | ||
|
||
fn main() { | ||
let args = CliInputs::parse(); | ||
println!( | ||
"remote_repo_url: {:?}, feature_branch: {:?}, | ||
optional_commit_hash: {:?}, optional_rustfmt_config: {:?}", | ||
args.remote_repo_url, args.feature_branch, args.commit_hash, args.rustfmt_config | ||
); | ||
} |
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