From c88f4184eaa48efbdc69e76eb3c8a4a206434ad3 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 16 Aug 2025 14:52:24 -0400 Subject: Started writing a data validator Currently, it can check whether identifiers point to non-existent objects, or whether multiple objects share the same identifier. It can also determine whether an identifier is underspecified (e.g. a door doesn't specify a room, or a global connection doesn't specify a map). --- tools/validator/main.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tools/validator/main.cpp (limited to 'tools/validator/main.cpp') diff --git a/tools/validator/main.cpp b/tools/validator/main.cpp new file mode 100644 index 0000000..af9842b --- /dev/null +++ b/tools/validator/main.cpp @@ -0,0 +1,31 @@ +#include "human_processor.h" +#include "structs.h" +#include "validator.h" + +namespace com::fourisland::lingo2_archipelago { +namespace { + +void Run(const std::string& mapdir) { + CollectedInfo info; + + ProcessHumanData(mapdir, info); + + ValidateCollectedInfo(info); +} + +} // namespace +} // namespace com::fourisland::lingo2_archipelago + +int main(int argc, char** argv) { + if (argc != 2) { + std::cout << "Incorrect argument count." << std::endl; + std::cout << "Usage: validator [path to map directory]" << std::endl; + return 1; + } + + std::string mapdir = argv[1]; + + com::fourisland::lingo2_archipelago::Run(mapdir); + + return 0; +} -- cgit 1.4.1