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§
- Output
Format - 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.