Skip to main content

Module output

Module output 

Source
Expand description

Output formatting utilities for linthis results.

The fix_tip_lines() function provides a single source of truth for the “Tip: To review and fix issues” hints used in both terminal output and hook output boxes.

Enums§

OutputFormat
Output format enum

Functions§

detect_available_cli_provider
Detect the first available AI CLI provider (claude-cli or codebuddy-cli). Returns the provider name if found, or None if neither is available.
fix_tip_lines
Tip lines for “To review and fix issues” hints. Each entry is (command, description). Used by both terminal and hook output.
format_cmsg_result
Format a commit-msg hook result box (passed or blocked).
format_hook_paths_footer_pub
Build a footer showing the global and local git hook file paths.
format_issue_github_actions
Format a single lint issue for GitHub Actions output.
format_issue_human
Format a single lint issue for human-readable output.
format_result
Format result according to the specified output format.
format_result_github_actions
Format the entire run result for GitHub Actions.
format_result_hook
Format the entire run result for git hook output. Compact format with summary at top, error list, and fix instructions.
format_result_hook_with_width
format_result_human
Format the entire run result for human-readable output.
format_result_json
Format the entire run result as unified JSON.
format_result_with_hook_type
Format result with optional hook type for hook output.
format_review_box
format_summary_human
Format the run result summary for human-readable output.
get_terminal_width
Get the terminal width, with fallback to 80 columns.