output

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package output formats review results for terminal and machine consumption.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatGitHubReview

func FormatGitHubReview(findings []Finding) string

FormatGitHubReview formats all findings as a single GitHub PR review body.

func FormatJSON

func FormatJSON(findings []Finding) (string, error)

FormatJSON renders findings as machine-readable JSON.

func FormatSARIF

func FormatSARIF(findings []Finding, version string) string

FormatSARIF produces a SARIF 2.1.0 JSON report from findings.

func FormatTerminal

func FormatTerminal(findings []Finding, stats Stats) string

FormatTerminal renders a human-readable review report with ANSI colors.

Types

type Finding

type Finding struct {
	Concern   string
	Severity  int
	File      string
	Line      int
	EndLine   int
	Message   string
	Fix       string
	Reasoning string
	CWE       string
}

Finding for rendering.

type Stats

type Stats struct {
	FilesReviewed      int
	HunksAnalyzed      int
	FindingsTotal      int
	BySeverity         map[int]int
	ByConcern          map[string]int
	TokensUsed         int
	DurationPerConcern map[string]time.Duration
}

Stats for rendering.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL