lint

package
v0.72.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package lint contains functions for verifying zarf yaml files are valid

Package lint contains functions for verifying zarf yaml files are valid

Package lint contains functions for verifying zarf yaml files are valid

Index

Constants

View Source
const (
	SevErr  = "Error"
	SevWarn = "Warning"
)

Severity definitions.

Variables

This section is empty.

Functions

This section is empty.

Types

type LintError added in v0.39.0

type LintError struct {
	PackageName string
	Findings    []PackageFinding
}

LintError represents an error containing lint findings.

func (*LintError) Error added in v0.39.0

func (e *LintError) Error() string

func (*LintError) OnlyWarnings added in v0.39.0

func (e *LintError) OnlyWarnings() bool

OnlyWarnings returns true if all findings have severity warning.

type PackageFinding

type PackageFinding struct {
	// YqPath is the path to the key where the error originated from, this is sometimes empty in the case of a general error
	YqPath      string
	Description string
	// Item is the value of a key that is causing an error, for example a bad image name
	Item string
	// Severity of finding.
	Severity Severity
}

PackageFinding is a struct that contains a finding about something wrong with a package

func CheckComponentValues

func CheckComponentValues(c v1alpha1.ZarfComponent, i int) []PackageFinding

CheckComponentValues runs lint rules validating values on component keys, should be run after templating

func ValidatePackageSchemaAtPath added in v0.42.0

func ValidatePackageSchemaAtPath(path string, setVariables map[string]string) ([]PackageFinding, error)

ValidatePackageSchemaAtPath checks the Zarf package against the Zarf schema If path is a directory, it will look for layout.ZarfYAML within it. If path is a file, it will use that file directly.

func (PackageFinding) ItemizedDescription added in v0.39.0

func (f PackageFinding) ItemizedDescription() string

ItemizedDescription returns a string with the description and item if finding contains one.

type Severity

type Severity string

Severity is the type of finding.

Jump to

Keyboard shortcuts

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