Base class for validation tools. More...
#include <validation_tool.h>
Inherits yaze::cli::resources::CommandHandler.
Inherited by yaze::cli::agent::tools::DataValidateTool, yaze::cli::agent::tools::PatchCheckTool, yaze::cli::agent::tools::RomValidateTool, and yaze::cli::agent::tools::ValidateAllTool.

Protected Member Functions | |
| std::string | FormatIssuesAsJson (const std::vector< ValidationIssue > &issues) const |
| Format validation issues as JSON. | |
| std::string | FormatIssuesAsText (const std::vector< ValidationIssue > &issues) const |
| Format validation issues as text. | |
Protected Member Functions inherited from yaze::cli::resources::CommandHandler | |
| virtual absl::Status | ValidateArgs (const ArgumentParser &parser)=0 |
| Validate command arguments. | |
| virtual absl::Status | Execute (Rom *rom, const ArgumentParser &parser, OutputFormatter &formatter)=0 |
| Execute the command business logic. | |
| virtual std::string | GetDefaultFormat () const |
| Get the default output format ("json" or "text") | |
| virtual std::string | GetOutputTitle () const |
| Get the output title for formatting. | |
Additional Inherited Members | |
Public Member Functions inherited from yaze::cli::resources::CommandHandler | |
| virtual | ~CommandHandler ()=default |
| absl::Status | Run (const std::vector< std::string > &args, Rom *rom_context, std::string *captured_output=nullptr) |
| Execute the command. | |
| virtual std::string | GetName () const =0 |
| Get the command name. | |
| virtual Descriptor | Describe () const |
| Provide metadata for TUI/help summaries. | |
| virtual std::string | GetUsage () const =0 |
| Get the command usage string. | |
| virtual bool | RequiresRom () const |
| Check if the command requires a loaded ROM. | |
| virtual bool | RequiresLabels () const |
| Check if the command requires ROM labels. | |
| virtual void | SetProjectContext (project::YazeProject *project) |
| Set the YazeProject context. Default implementation does nothing, override if tool needs project info. | |
| virtual void | SetAsarWrapper (core::AsarWrapper *asar_wrapper) |
| Set the AsarWrapper context. Default implementation does nothing, override if tool needs Asar access. | |
| virtual void | SetRomContext (Rom *rom) |
| Set the ROM context for tools that need ROM access. Default implementation stores the ROM pointer for subclass use. | |
Protected Attributes inherited from yaze::cli::resources::CommandHandler | |
| Rom * | rom_ = nullptr |
| project::YazeProject * | project_ = nullptr |
| core::AsarWrapper * | asar_wrapper_ = nullptr |
Base class for validation tools.
Definition at line 56 of file validation_tool.h.
|
protected |
Format validation issues as JSON.
Definition at line 27 of file validation_tool.cc.
References yaze::cli::agent::tools::ValidationIssue::kCritical, yaze::cli::agent::tools::ValidationIssue::kError, yaze::cli::agent::tools::ValidationIssue::kInfo, and yaze::cli::agent::tools::ValidationIssue::kWarning.
Referenced by yaze::cli::agent::tools::RomValidateTool::Execute(), yaze::cli::agent::tools::DataValidateTool::Execute(), yaze::cli::agent::tools::PatchCheckTool::Execute(), and yaze::cli::agent::tools::ValidateAllTool::Execute().
|
protected |
Format validation issues as text.
Definition at line 69 of file validation_tool.cc.
References yaze::cli::agent::tools::ValidationIssue::kCritical, yaze::cli::agent::tools::ValidationIssue::kError, yaze::cli::agent::tools::ValidationIssue::kInfo, and yaze::cli::agent::tools::ValidationIssue::kWarning.
Referenced by yaze::cli::agent::tools::RomValidateTool::Execute(), yaze::cli::agent::tools::DataValidateTool::Execute(), yaze::cli::agent::tools::PatchCheckTool::Execute(), and yaze::cli::agent::tools::ValidateAllTool::Execute().