mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 19:13:52 +00:00
feat(editor): add --summary flag to --audit-watertight-wob
Parity with the WOM-side --audit-watertight --summary added last batch. Same one-line rollup format for CI dashboards: watertight-wob: PASS (1 buildings, 0 failure(s)) [/tmp/migtest, weld 0.001000] watertight-wob: FAIL (12 buildings, 4 failure(s)) [/tmp/zone, weld 0.001000] Format: "watertight-wob: <PASS|FAIL> (<N> buildings, <K> failure(s)) [<root>, weld <eps>]". Exit code unchanged — failure count capped at 255. Both --audit-watertight (WOM) and --audit-watertight-wob (WOB) now offer the same trio of output modes: verbose (default), --json (machine-readable), --summary (one-line CI rollup).
This commit is contained in:
parent
f167e1d2cf
commit
0a374fd27d
2 changed files with 13 additions and 2 deletions
|
|
@ -495,10 +495,13 @@ int handleAuditWatertightWob(int& i, int argc, char** argv) {
|
|||
// intentional portal openings between them.
|
||||
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;
|
||||
|
|
@ -557,6 +560,14 @@ int handleAuditWatertightWob(int& i, int argc, char** argv) {
|
|||
std::printf("%s\n", j.dump(2).c_str());
|
||||
return std::min(failCount, 255);
|
||||
}
|
||||
if (summary) {
|
||||
std::printf("watertight-wob: %s (%zu buildings, %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 WOB audit: %s (weld eps %.6f)\n",
|
||||
root.c_str(), weldEps);
|
||||
if (rows.empty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue