Skip to content

Commit 332ecc3

Browse files
committed
List checks
1 parent 1cc1629 commit 332ecc3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

fontspector-cli/src/main.rs

+14
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,20 @@ fn main() {
6565
std::process::exit(1);
6666
});
6767

68+
if args.list_checks {
69+
for (section, checks) in profile.sections.iter() {
70+
termimad::print_text(&format!("# {:}\n\n", section));
71+
let mut table = "|Check ID|Title|\n|---|---|\n".to_string();
72+
for check in checks {
73+
if let Some(check) = registry.checks.get(check) {
74+
table.push_str(&format!("|{:}|{:}|\n", check.id, check.title));
75+
}
76+
}
77+
termimad::print_text(&table);
78+
}
79+
std::process::exit(0);
80+
}
81+
6882
// We create one collection for each set of testable files in a directory.
6983
// So let's group the inputs per directory, and then map them into a FontCollection
7084
let grouped_inputs: Vec<TestableCollection> = args

0 commit comments

Comments
 (0)