lint

package
v0.30.15 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int

Level represents the severity of a lint diagnostic.

const (
	Ignored Level = iota // diagnostic is suppressed
	Warn                 // non-blocking advisory
	Error                // blocking issue
)

Severity levels ordered from least to most severe.

func (Level) Ptr

func (l Level) Ptr() *Level

Ptr returns pointer of the level

func (Level) String

func (l Level) String() string

String returns the canonical string representation of the Level.

type LinterSettings

type LinterSettings struct {
	Impact *Level
}

LinterSettings holds the configured severity for an entire linter.

func (*LinterSettings) SetLevel

func (s *LinterSettings) SetLevel(level string)

SetLevel parses level and stores it as the linter's impact severity, defaulting to Error when level is empty.

type RuleSettings

type RuleSettings struct {
	Impact *Level
}

RuleSettings holds the configured severity for an individual rule.

func (*RuleSettings) SetLevel

func (s *RuleSettings) SetLevel(level string, fallback *Level)

SetLevel parses level or, if empty, fallback and stores the result as the rule's impact severity, defaulting to Error when both are empty.

Directories

Path Synopsis
linters
icon
Package icon validates package-icon content (format, size, dimensions).
Package icon validates package-icon content (format, size, dimensions).
oss
Package oss validates optional oss.yaml package metadata.
Package oss validates optional oss.yaml package metadata.

Jump to

Keyboard shortcuts

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