Hwaro::CLI::Commands::Tool::DoctorCommand
Inherits Reference / Object
Constants
DESCRIPTION = "Diagnose config, template, and structure issues"
FLAGS = [CONTENT_DIR_FLAG, FlagInfo.new(short: nil, long: "--fix", description: "Perform real fixes (normalize values like base_url trailing slash, sitemap priority, etc.)"), FlagInfo.new(short: nil, long: "--approve", description: "Approve and add recommended optional config sections (use with --fix or alone)"), FlagInfo.new(short: nil, long: "--full", description: "Equivalent to --fix --approve (real fixes + all recommended sections)"), FlagInfo.new(short: nil, long: "--dry-run", description: "Preview changes without writing config.toml"), FlagInfo.new(short: nil, long: "--strict", description: "Treat warnings as errors when computing the exit code"), MAX_WARNINGS_FLAG, JSON_FLAG, QUIET_FLAG, HELP_FLAG]
Flags defined here are used both for OptionParser and completion generation
JSON_SCHEMA_VERSION = 1
Schema version for --json output. Bump when adding fields
that machine consumers may rely on.
MAX_WARNINGS_FLAG = FlagInfo.new(short: nil, long: "--max-warnings", description: "Exit non-zero when warning count exceeds N (default: unlimited)", takes_value: true, value_hint: "N")
NAME = "doctor"
Single source of truth for command metadata
POSITIONAL_ARGS = [] of String
POSITIONAL_CHOICES = [] of String
Class methods
metadata
SourceInstance methods
run(args : Array(String), invocation : String = "hwaro tool doctor")
invocation lets the top-level hwaro doctor alias and the
canonical hwaro tool doctor form each show their own usage
banner, even though both share this single implementation.