Skip to main content

Module format

Module format 

Source
Expand description

External tool runner and auto-formatter detection.

Provides subprocess execution with timeout protection, language-to-formatter mapping, and the auto_format entry point used by write_format_validate.

Structs§

ExternalToolResult
Result of running an external tool subprocess.
ValidationError
A structured error from a type checker.

Enums§

FormatError
Errors from external tool execution.

Functions§

auto_format
Auto-format a file using the detected formatter for its language.
detect_formatter
Detect the appropriate formatter command and arguments for a file.
detect_type_checker
Detect the appropriate type checker command and arguments for a file.
parse_checker_output
Parse type checker output into structured validation errors.
run_external_tool
Spawn a subprocess and wait for completion with timeout protection.
run_external_tool_capture
Spawn a subprocess and capture output regardless of exit code.
validate_full
Run the project’s type checker and return structured validation errors.