(** Message output formatters. This module provides various output formats for validation messages, including text, JSON, and GNU-style formats for IDE integration. *) (** {1 Formatters} *) (** Format messages as human-readable text. Output format: [file:line:col: severity: message] @param system_id Optional default system identifier for messages without location. *) val format_text : ?system_id:string -> Message.t list -> string (** Format messages as JSON. Produces output compatible with the Nu HTML Validator JSON format. @param system_id Optional default system identifier for messages without location. *) val format_json : ?system_id:string -> Message.t list -> string (** Format messages in GNU style for IDE integration. Output format follows GNU conventions for error messages, compatible with most IDEs and editors. @param system_id Optional default system identifier for messages without location. *) val format_gnu : ?system_id:string -> Message.t list -> string (** {1 JSON Value Builders} These functions return [Jsont.json] values that can be reused for custom JSON encoding scenarios. *) (** Convert a single message to JSON AST. Produces JSON compatible with the Nu HTML Validator format: {[ { "type": "error", "message": "...", "subType": "error-code", "url": "...", "firstLine": 1, "firstColumn": 1, ... } ]} @param system_id Default system identifier for messages without location.system_id. *) val message_to_json : ?system_id:string -> Message.t -> Jsont.json (** Convert a message list to JSON AST with wrapper object. Produces JSON with a "messages" array: {[ { "messages": [...] } ]} @param system_id Default system identifier for messages without location.system_id. *) val messages_to_json : ?system_id:string -> Message.t list -> Jsont.json