reporting

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxLineLength is the maximum length of a line displayed in error messages
	MaxLineLength = 200
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter

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

Reporter handles violation reporting with pretty formatting

func NewReporter

func NewReporter(pass *analysis.Pass, ignoreSet *util.IgnoreSet) *Reporter

func (*Reporter) ReportViolation

func (r *Reporter) ReportViolation(violation Violation)

func (*Reporter) ReportViolations

func (r *Reporter) ReportViolations(violations []Violation)

type Violation

type Violation interface {
	// GetCode returns the error code for this violation
	GetCode() string

	// GetPos returns the position of the violation
	GetPos() token.Pos

	// GetMessage returns the main error message without formatting
	GetMessage() string
}

Violation represents a generic violation interface All violation types should implement this interface

Jump to

Keyboard shortcuts

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