Kelsidavis-WoWee/tools/editor/cli_audit_tree.hpp
Kelsi 824b6ebf53 feat(editor): add --audit-tree to flag corrupted/misnamed Wowee files
Walks a directory recursively and groups problems by category:
too-small (file under 16 bytes — can't hold a header),
unknown-magic (.w* file whose magic is not in the format table),
ext-mismatch (extension says one format but the magic says
another — usually from a renamed file), magic-no-ext (file with
recognized Wowee magic but no .w* extension), and header-trunc
(magic matches but the rest of the header is truncated). Returns
exit 1 if any issue is found, so it composes into shell pipelines
and CI checks. JSON sidecar via --json.

Catches the kinds of breakage that --summary-dir silently rolls
into the "unrecognized" bucket — a renamed .wsrg file masquerading
as .wsct shows up cleanly here but would otherwise be invisible.
Like every cross-format utility this reuses cli_format_table.cpp,
so new formats are audited automatically. CLI flag count
906 -> 907.
2026-05-09 21:45:54 -07:00

11 lines
196 B
C++

#pragma once
namespace wowee {
namespace editor {
namespace cli {
bool handleAuditTree(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee