mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 11:03:51 +00:00
feat(editor): add --summary flag to --audit-watertight
CI-friendly one-line rollup mode for the welded watertight audit. Replaces the per-mesh PASS/FAIL detail lines with a single status line: watertight: FAIL (121 meshes, 27 failure(s)) [/tmp/migtest, weld 0.001000] watertight: PASS (6 meshes, 0 failure(s)) [/tmp/camp, weld 0.001000] Format: "watertight: <PASS|FAIL> (<N> meshes, <K> failure(s)) [<root>, weld <eps>]". Exit code unchanged — failure count capped at 255, matching the verbose-mode contract. Useful for build dashboards / CI grep lines / Slack-bot notifications where the full per-mesh dump would be too noisy. Verbose mode is still the default; opt in with --summary.
This commit is contained in:
parent
8d75dd3867
commit
88ba27f9ea
2 changed files with 15 additions and 2 deletions
|
|
@ -354,10 +354,13 @@ int handleAuditWatertight(int& i, int argc, char** argv) {
|
|||
// CI-friendly: zero on full success.
|
||||
std::string root = argv[++i];
|
||||
bool jsonOut = false;
|
||||
bool summary = false;
|
||||
float weldEps = 1e-4f;
|
||||
while (i + 1 < argc && argv[i + 1][0] == '-') {
|
||||
if (std::strcmp(argv[i + 1], "--json") == 0) {
|
||||
jsonOut = true; ++i;
|
||||
} else if (std::strcmp(argv[i + 1], "--summary") == 0) {
|
||||
summary = true; ++i;
|
||||
} else if (std::strcmp(argv[i + 1], "--weld") == 0 && i + 2 < argc) {
|
||||
try { weldEps = std::stof(argv[i + 2]); } catch (...) {}
|
||||
i += 2;
|
||||
|
|
@ -414,6 +417,16 @@ int handleAuditWatertight(int& i, int argc, char** argv) {
|
|||
std::printf("%s\n", j.dump(2).c_str());
|
||||
return std::min(failCount, 255);
|
||||
}
|
||||
if (summary) {
|
||||
// Single rollup line for CI dashboards: PASS/FAIL +
|
||||
// counts. Goes to stdout so build systems can capture it.
|
||||
std::printf("watertight: %s (%zu meshes, %d failure(s)) "
|
||||
"[%s, weld %.6f]\n",
|
||||
failCount == 0 ? "PASS" : "FAIL",
|
||||
rows.size(), failCount,
|
||||
root.c_str(), weldEps);
|
||||
return std::min(failCount, 255);
|
||||
}
|
||||
std::printf("Watertight audit: %s (weld eps %.6f)\n",
|
||||
root.c_str(), weldEps);
|
||||
if (rows.empty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue