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.