All modules containing functions should have corresponding .mli files with comprehensive documentation. The .mli file must include: 1. **Module purpose**: A clear, high-level description of what the module does and why it exists
All modules containing functions should have corresponding .mli files with comprehensive documentation. The .mli file must include:
Example structure:
(** High-level module purpose and goals.
This module handles X by doing Y, and is primarily used for Z.
See also {!Related_module} for similar functionality.
*)
(** Custom type representing... *)
type analysis_flags = {
secrets_validators : bool; (** Enable secrets validation *)
historical_scan : bool; (** Scan historical data *)
(* ... *)
}
(** Execute a command request.
@param request The command to execute
@param context Current execution context
@return Result of execution or error
Note: Automatically handles 307 redirects for binary downloads.
*)
val handle_execute_request : request -> context -> (result, error) Result.t
This ensures that module interfaces are self-documenting and that ocamldoc can generate useful documentation. Avoid vague function names without proper documentation, and always explain the module’s role in the larger system.
Enter the URL of a public GitHub repository