Skip to content

Commit 3b3cbdf

Browse files
committed
fix check_diff formatting and add to tests
1 parent a090861 commit 3b3cbdf

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

check_diff/src/main.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ struct CliInputs {
99
/// Optional commit hash from the feature branch
1010
#[arg(short, long)]
1111
commit_hash: Option<String>,
12-
/// Optional comma separated list of rustfmt config options to pass when running the feature branch
12+
/// Optional comma separated list of rustfmt config options to
13+
/// pass when running the feature branch
1314
#[arg(value_delimiter = ',', short, long,num_args = 1..)]
1415
rustfmt_config: Option<Vec<String>>,
1516
}
1617

1718
fn main() {
1819
let args = CliInputs::parse();
1920
println!(
20-
"remote_repo_url: {:?}, feature_branch: {:?}, optional_commit_hash: {:?}, optional_rustfmt_config: {:?}" ,
21+
"remote_repo_url: {:?}, feature_branch: {:?},
22+
optional_commit_hash: {:?}, optional_rustfmt_config: {:?}",
2123
args.remote_repo_url, args.feature_branch, args.commit_hash, args.rustfmt_config
22-
)
24+
);
2325
}

src/test/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,13 @@ fn idempotence_tests() {
383383
fn self_tests() {
384384
init_log();
385385
let mut files = get_test_files(Path::new("tests"), false);
386-
let bin_directories = vec!["cargo-fmt", "git-rustfmt", "bin", "format-diff"];
386+
let bin_directories = vec![
387+
"cargo-fmt",
388+
"git-rustfmt",
389+
"bin",
390+
"format-diff",
391+
"check_diff",
392+
];
387393
for dir in bin_directories {
388394
let mut path = PathBuf::from("src");
389395
path.push(dir);

0 commit comments

Comments
 (0)