report

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package report renders findings as human-readable or JSON output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compact added in v0.2.2

type Compact struct{ NoColor bool }

Compact renders one flat `path:line:col rule severity message` line per finding. It is the guaranteed clickable / pipe-friendly format and the automatic fallback when stdout is not a terminal.

func (Compact) Report added in v0.2.2

func (c Compact) Report(w io.Writer, findings []rule.Finding) error

Report writes each finding then a summary footer.

type Human

type Human struct{ NoColor bool }

Human renders findings grouped by file in an eslint-"stylish" layout: a bold file-path header (the clickable anchor) followed by indented, column-aligned finding rows, then a one-line problem summary. Styling is applied with lipgloss; NoColor (or the NO_COLOR env var) yields plain, ANSI-free text.

func (Human) Report

func (h Human) Report(w io.Writer, findings []rule.Finding) error

Report writes findings grouped by file, then a summary footer. Findings are expected pre-sorted by path,line,col (the engine guarantees this).

type JSON

type JSON struct{}

JSON renders findings as a JSON array (stable machine schema).

func (JSON) Report

func (j JSON) Report(w io.Writer, findings []rule.Finding) error

Report marshals findings; severity is rendered via its String form.

type Reporter

type Reporter interface {
	Report(w io.Writer, findings []rule.Finding) error
}

Reporter writes findings to w.

Jump to

Keyboard shortcuts

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