reporter

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompactReporter

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

CompactReporter reports violations in a compact table.

func NewCompactReporter

func NewCompactReporter(out io.Writer) CompactReporter

NewCompactReporter creates a new CompactReporter.

func (CompactReporter) Publish

func (tr CompactReporter) Publish(_ context.Context, r report.Report) error

Publish prints a compact report to the configured output.

type FestiveReporter added in v0.14.0

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

FestiveReporter reports violations in a format suitable for the holidays.

func NewFestiveReporter added in v0.14.0

func NewFestiveReporter(out io.Writer) FestiveReporter

NewFestiveReporter creates a new FestiveReporter.

func (FestiveReporter) Publish added in v0.14.0

func (tr FestiveReporter) Publish(ctx context.Context, r report.Report) error

Publish prints a festive report to the configured output.

type GitHubReporter added in v0.8.0

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

GitHubReporter reports violations in a format suitable for GitHub Actions.

func NewGitHubReporter added in v0.8.0

func NewGitHubReporter(out io.Writer) GitHubReporter

NewGitHubReporter creates a new GitHubReporter.

func (GitHubReporter) Publish added in v0.8.0

func (tr GitHubReporter) Publish(ctx context.Context, r report.Report) error

Publish first prints the pretty formatted report to console for easy access in the logs. It then goes on to print the GitHub Actions annotations for each violation. Finally, it prints a summary of the report suitable for the GitHub Actions UI.

type JSONReporter

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

JSONReporter reports violations as JSON.

func NewJSONReporter

func NewJSONReporter(out io.Writer) JSONReporter

NewJSONReporter creates a new JSONReporter.

func (JSONReporter) Publish

func (tr JSONReporter) Publish(_ context.Context, r report.Report) error

Publish prints a JSON report to the configured output.

type PrettyReporter

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

PrettyReporter is a Reporter for representing reports as tables.

func NewPrettyReporter

func NewPrettyReporter(out io.Writer) PrettyReporter

NewPrettyReporter creates a new PrettyReporter.

func (PrettyReporter) Publish

func (tr PrettyReporter) Publish(_ context.Context, r report.Report) error

Publish prints a pretty report to the configured output.

type Reporter

type Reporter interface {
	// Publish releases a report to any appropriate target
	Publish(context.Context, report.Report) error
}

Reporter releases linter reports in a format decided by the implementation.

type SarifReporter added in v0.14.0

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

SarifReporter reports violations in the SARIF (https://sarifweb.azurewebsites.net/) format.

func NewSarifReporter added in v0.14.0

func NewSarifReporter(out io.Writer) SarifReporter

NewSarifReporter creates a new SarifReporter.

func (SarifReporter) Publish added in v0.14.0

func (tr SarifReporter) Publish(_ context.Context, r report.Report) error

Publish prints a SARIF report to the configured output.

Jump to

Keyboard shortcuts

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