Skip to content

Commit 8807c9f

Browse files
Merge pull request #88 from ErichDonGubler/soft-rename-cmds-after-taint
Soft-rename `process-reports` to `update-expected`, `fmt` to `fixup`
2 parents 646f041 + 38e10e6 commit 8807c9f

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

moz-webgpu-cts/src/main.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ enum Subcommand {
7575
/// With both steps, you may delete the local copies of these reports after being processed
7676
/// with `process-reports`. You should not need to re-process them unless you have made an
7777
/// error in following these steps.
78-
ProcessReports {
78+
#[clap(alias = "process-reports")]
79+
UpdateExpected {
7980
/// Direct paths to report files to be processed.
8081
report_paths: Vec<PathBuf>,
8182
/// Cross-platform `wax` globs to enumerate report files to be processed.
@@ -88,9 +89,9 @@ enum Subcommand {
8889
#[clap(long, default_value = "reset-contradictory")]
8990
preset: ReportProcessingPreset,
9091
},
91-
/// Parse test metadata and re-emit it in normalized form.
92-
#[clap(name = "fmt")]
93-
Format,
92+
/// Parse test metadata, apply automated fixups, and re-emit it in normalized form.
93+
#[clap(name = "fixup", alias = "fmt")]
94+
Fixup,
9495
Triage {
9596
#[clap(value_enum, long, default_value_t = Default::default())]
9697
on_zero_item: OnZeroItem,
@@ -189,7 +190,7 @@ fn run(cli: Cli) -> ExitCode {
189190
}
190191

191192
match subcommand {
192-
Subcommand::ProcessReports {
193+
Subcommand::UpdateExpected {
193194
report_globs,
194195
report_paths,
195196
preset,
@@ -787,17 +788,17 @@ fn run(cli: Cli) -> ExitCode {
787788

788789
ExitCode::SUCCESS
789790
}
790-
Subcommand::Format => {
791+
Subcommand::Fixup => {
791792
let raw_test_files_by_path = match read_metadata() {
792793
Ok(paths) => paths,
793794
Err(AlreadyReportedToCommandline) => return ExitCode::FAILURE,
794795
};
795796
log::info!("formatting metadata in-place…");
796-
let mut fmt_err_found = false;
797+
let mut err_found = false;
797798
for (path, file_contents) in raw_test_files_by_path {
798799
match chumsky::Parser::parse(&File::parser(), &*file_contents).into_result() {
799800
Err(errors) => {
800-
fmt_err_found = true;
801+
err_found = true;
801802
render_metadata_parse_errors(&path, &file_contents, errors);
802803
}
803804
Ok(mut file) => {
@@ -814,14 +815,14 @@ fn run(cli: Cli) -> ExitCode {
814815
match write_to_file(&path, metadata::format_file(&file)) {
815816
Ok(()) => (),
816817
Err(AlreadyReportedToCommandline) => {
817-
fmt_err_found = true;
818+
err_found = true;
818819
}
819820
};
820821
}
821822
}
822823
}
823824

824-
if fmt_err_found {
825+
if err_found {
825826
log::error!(concat!(
826827
"found one or more failures while formatting metadata, ",
827828
"see above for more details"

0 commit comments

Comments
 (0)