/** * CLI Check Entry Point * * Implements argument parsing for rill-check. * Validates Rill source files against linting rules. */ import type { Diagnostic, Severity } from './check/index.js'; /** Severity threshold for failing exit code. */ export type MinSeverity = Severity; /** * Parsed command-line arguments for rill-check */ export type ParsedCheckArgs = { mode: 'check'; file: string; fix: boolean; verbose: boolean; format: 'text' | 'json'; minSeverity: MinSeverity; runTypes: boolean; } | { mode: 'scan'; verbose: boolean; format: 'text' | 'json'; minSeverity: MinSeverity; runTypes: boolean; } | { mode: 'help'; }; /** * Parse command-line arguments for rill-check * * @param argv - Raw command-line arguments (typically process.argv.slice(2)) * @returns Parsed command object */ export declare function parseCheckArgs(argv: string[]): ParsedCheckArgs; /** * Returns true when the diagnostic's severity meets or exceeds the threshold. * Severity ranks: info < warning < error. */ export declare function meetsSeverityThreshold(diagnostic: Diagnostic, min: MinSeverity): boolean; /** * Format diagnostics for output * * Adapts pattern from cli-shared.ts formatError function. * Text format: file:line:col: severity: message (code) * JSON format: complete schema with errors array and summary * Verbose mode: adds category field to diagnostics * * @param file - File path being checked * @param diagnostics - Array of diagnostics to format * @param format - Output format ('text' or 'json') * @param verbose - Whether to include category and doc references * @returns Formatted output string */ export declare function formatDiagnostics(file: string, diagnostics: Diagnostic[], format: 'text' | 'json', verbose: boolean): string; /** * Main entry point for rill-check CLI. * Orchestrates argument parsing, file reading, validation, fixing, and output. */ export declare function main(argv: string[]): Promise;