reporter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsoleReporter

type ConsoleReporter struct {
	// contains filtered or unexported fields
}

ConsoleReporter prints analysis results to the terminal with color. The output writer is fixed at construction so Report is safe for concurrent use (the writer cannot be swapped out from under an in-flight Report).

func NewConsoleReporter

func NewConsoleReporter() *ConsoleReporter

NewConsoleReporter creates a ConsoleReporter that writes to stderr.

func NewConsoleReporterTo

func NewConsoleReporterTo(w io.Writer) *ConsoleReporter

NewConsoleReporterTo creates a ConsoleReporter that writes to w.

func (*ConsoleReporter) Report

func (c *ConsoleReporter) Report(results []analyzer.Result)

Report writes each result to the configured output, colored by severity.

type JSONReporter

type JSONReporter struct {
	// contains filtered or unexported fields
}

JSONReporter outputs analysis results as JSON. The output writer is fixed at construction so Report is safe for concurrent use (the writer cannot be swapped out from under an in-flight Report).

func NewJSONReporter

func NewJSONReporter() *JSONReporter

NewJSONReporter creates a JSONReporter that writes to stderr.

func NewJSONReporterTo

func NewJSONReporterTo(w io.Writer) *JSONReporter

NewJSONReporterTo creates a JSONReporter that writes to w.

func (*JSONReporter) Report

func (j *JSONReporter) Report(results []analyzer.Result)

Report writes the results to the configured output as a JSON array.

type Reporter

type Reporter interface {
	Report(results []analyzer.Result)
}

Reporter defines the interface for reporting analysis results.

Jump to

Keyboard shortcuts

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