lint

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCheckstyle

func FormatCheckstyle(issues []Issue) (string, error)

FormatCheckstyle formats issues in the Checkstyle XML format.

func FormatGNU

func FormatGNU(issues []Issue) (string, error)

FormatGNU formats issues in the GNU error format. path/to/file:line:col: category: message

func FormatSARIF

func FormatSARIF(issues []Issue) (string, error)

FormatSARIF formats issues in the SARIF format.

Types

type Category

type Category string

Category represents the category of a lint check.

const (
	CategorySpec  Category = "spec"
	CategoryStyle Category = "style"
)

func (Category) Severity

func (c Category) Severity() Severity

Severity returns the severity associated with the category.

type Check

type Check interface {
	Check(dir string) ([]Issue, error)
}

type Formatter

type Formatter interface {
	Format(issues []Issue) (string, error)
}

Formatter is the interface for formatting lint issues.

type Issue

type Issue struct {
	Path     string
	Line     int
	Column   int
	Message  string
	Category Category
}

Issue represents a single linting issue found in a skill.

func (Issue) String

func (i Issue) String() string

type Linter

type Linter struct {
	Checks []Check
}

func NewLinter

func NewLinter(checks []Check) *Linter

func (*Linter) Run

func (l *Linter) Run(dir string) ([]Issue, error)

type Severity

type Severity int

Severity represents the severity of a lint issue.

const (
	SeverityError Severity = iota
	SeverityWarning
	SeverityInfo
)

func (Severity) String

func (s Severity) String() string

type SpecCheck

type SpecCheck struct{}

func (*SpecCheck) Check

func (c *SpecCheck) Check(dir string) ([]Issue, error)

type StyleCheck

type StyleCheck struct{}

func (*StyleCheck) Check

func (c *StyleCheck) Check(dir string) ([]Issue, error)

Jump to

Keyboard shortcuts

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