formatter: Format deftype correctly (#3391)

New configuration options to format column widths in deftype field
definitions. Also force each field/method/state to be inlined.
This commit is contained in:
Tyler Wilding
2024-02-27 20:12:44 -05:00
committed by GitHub
parent 8f1aba639c
commit ccd47f8465
18 changed files with 580 additions and 558 deletions
+5
View File
@@ -102,6 +102,11 @@ bool run_tests(const fs::path& file_path, const bool only_important_tests) {
if (only_important_tests && !str_util::starts_with(test.name, "!")) {
continue;
}
if (str_util::contains(test.output, "TODO")) {
// ignore the output
fmt::print(" ⚠️ - {}\n", test.name);
continue;
}
const auto formatted_result = formatter::format_code(test.input);
if (formatted_result && str_util::starts_with(test.name, "!?")) {
fmt::print("FORMATTED RESULT:\n\n{}\n\n", formatted_result.value());