lint

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package lint validates BubbleFish Nexus configuration and warns about dangerous or suboptimal settings. It implements the `bubblefish lint` CLI command and the /api/lint admin endpoint.

Reference: Tech Spec Section 6.7.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finding

type Finding struct {
	Severity Severity `json:"severity"`
	Check    string   `json:"check"`
	Message  string   `json:"message"`
}

Finding is a single lint diagnostic.

type Result

type Result struct {
	Findings []Finding `json:"findings"`
}

Result holds all findings from a lint run.

func Run

func Run(cfg *config.Config, configDir string) *Result

Run executes all lint checks against the loaded configuration. The configDir is used for file-existence checks (compiled sigs, etc.).

Reference: Tech Spec Section 6.7.

func (*Result) HasErrors

func (r *Result) HasErrors() bool

HasErrors returns true if any finding has error severity.

func (*Result) WarningCount

func (r *Result) WarningCount() int

WarningCount returns the total number of findings (both warn and error).

type Severity

type Severity string

Severity indicates whether a finding is a warning or an error. Errors cause exit code 1; warnings do not.

const (
	Warn  Severity = "warn"
	Error Severity = "error"
)

Jump to

Keyboard shortcuts

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