mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 02:53:51 +00:00
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.
This commit is contained in:
parent
02564171b5
commit
167d523e70
4 changed files with 599 additions and 513 deletions
23
tools/editor/cli_check.hpp
Normal file
23
tools/editor/cli_check.hpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue