Kelsidavis-WoWee/tools/editor/cli_check.hpp
Kelsi 167d523e70 refactor(editor): extract check-* sanity handlers into cli_check.cpp
Moves the four cross-reference / content sanity-check
handlers (--check-zone-refs, --check-zone-content,
--check-project-content, --check-project-refs) out of
main.cpp into a new cli_check.{hpp,cpp} module. Each goes
deeper than --validate (which only checks open-format file
presence) — verifying that quest NPC IDs resolve to
creatures.json entries, model paths resolve to on-disk files,
spawn positions sit inside the zone's tile bounds, etc.

main.cpp shrinks by 509 lines (2,807 to 2,298). All four
preserve --json output for CI pipelines.
2026-05-09 09:25:41 -07:00

23 lines
851 B
C++

#pragma once
namespace wowee {
namespace editor {
namespace cli {
// Dispatch the cross-reference / content sanity-check handlers.
// Each goes deeper than --validate (which only checks open-
// format file presence) — they verify that quest NPC IDs
// resolve to creatures.json entries, model paths resolve to
// on-disk files, spawn positions sit inside the zone's tile
// bounds, etc. All four support --json for CI pipelines.
// --check-zone-refs single-zone ref integrity
// --check-zone-content single-zone content sanity
// --check-project-content project-wide content sanity
// --check-project-refs project-wide ref integrity rollup
//
// Returns true if matched; outRc holds the exit code.
bool handleCheck(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee