Skip to content

Commit bc82253

Browse files
feat(fmt): rename to fixup, alias fmt still
1 parent 877fa4a commit bc82253

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

moz-webgpu-cts/src/main.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ enum Subcommand {
8888
#[clap(long, default_value = "reset-contradictory")]
8989
preset: ReportProcessingPreset,
9090
},
91-
/// Parse test metadata and re-emit it in normalized form.
92-
#[clap(name = "fmt")]
93-
Format,
91+
/// Parse test metadata, apply automated fixups, and re-emit it in normalized form.
92+
#[clap(name = "fixup", alias = "fmt")]
93+
Fixup,
9494
Triage {
9595
#[clap(value_enum, long, default_value_t = Default::default())]
9696
on_zero_item: OnZeroItem,
@@ -787,17 +787,17 @@ fn run(cli: Cli) -> ExitCode {
787787

788788
ExitCode::SUCCESS
789789
}
790-
Subcommand::Format => {
790+
Subcommand::Fixup => {
791791
let raw_test_files_by_path = match read_metadata() {
792792
Ok(paths) => paths,
793793
Err(AlreadyReportedToCommandline) => return ExitCode::FAILURE,
794794
};
795795
log::info!("formatting metadata in-place…");
796-
let mut fmt_err_found = false;
796+
let mut err_found = false;
797797
for (path, file_contents) in raw_test_files_by_path {
798798
match chumsky::Parser::parse(&File::parser(), &*file_contents).into_result() {
799799
Err(errors) => {
800-
fmt_err_found = true;
800+
err_found = true;
801801
render_metadata_parse_errors(&path, &file_contents, errors);
802802
}
803803
Ok(mut file) => {
@@ -814,14 +814,14 @@ fn run(cli: Cli) -> ExitCode {
814814
match write_to_file(&path, metadata::format_file(&file)) {
815815
Ok(()) => (),
816816
Err(AlreadyReportedToCommandline) => {
817-
fmt_err_found = true;
817+
err_found = true;
818818
}
819819
};
820820
}
821821
}
822822
}
823823

824-
if fmt_err_found {
824+
if err_found {
825825
log::error!(concat!(
826826
"found one or more failures while formatting metadata, ",
827827
"see above for more details"

0 commit comments

Comments
 (0)