metalinter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SeverityError   = "error"
	SeverityWarning = "warning"
	SeverityInfo    = "info"

	CategoryBug         = "bug"
	CategoryStyle       = "style"
	CategoryFormatting  = "formatting"
	CategoryUnused      = "unused"
	CategoryPerformance = "performance"
	CategoryCorrectness = "correctness"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Finding

type Finding struct {
	Tool     string `json:"tool"`     // "govet", "staticcheck", "gofmt", "misspell", "ineffassign"
	Code     string `json:"code"`     // e.g. "SA1000", "S1017", "formatting"
	Severity string `json:"severity"` // "error", "warning", "info"
	File     string `json:"file_path"`
	Line     int    `json:"line_start"`
	Column   int    `json:"col_start"`
	Message  string `json:"message"`
	Category string `json:"category"` // "bug", "style", "formatting", "unused", "performance"
}

Finding represents a single issue detected by an embedded meta-linter.

func LintGo

func LintGo(pkgPaths []string) ([]Finding, error)

LintGo runs all Go meta-linters on the given package paths. Returns findings from all embedded tools. The pkgPaths are file paths or directory paths containing Go files.

func (Finding) ProblemsFormat

func (f Finding) ProblemsFormat() string

ProblemsFormat returns a GCC-style string for IDE problem matchers.

Jump to

Keyboard shortcuts

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