lint

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package lint finds what in a compose file breaks parallel stacks or weakens siding's verdict. It reads the normalised configuration and never changes a file.

Index

Constants

View Source
const (
	Error   = "error"
	Warning = "warning"
	Info    = "info"
)

Severities, worst first.

View Source
const (
	ContainerName    = "ContainerName"
	FixedNetworkName = "FixedNetworkName"
	FixedVolumeName  = "FixedVolumeName"
	InvalidRoute     = fail.InvalidRoute
	AmbiguousPort    = fail.AmbiguousPort
	HostPath         = "HostPath"
	NetworkMode      = "NetworkMode"
	NoHealthcheck    = "NoHealthcheck"
	PublishedPort    = "PublishedPort"
	NoRoot           = "NoRoot"
	MissingEnvFile   = "MissingEnvFile"
	LocalhostURL     = "LocalhostURL"
)

Rules. Part of the --json contract.

Variables

This section is empty.

Functions

func HasErrors

func HasErrors(fs []Finding) bool

HasErrors reports whether a finding is an error.

Types

type Finding

type Finding struct {
	Rule     string
	Severity string
	// Subject is what the finding is about: "service web", "volume data", or "stack".
	Subject string
	Message string
	Hint    string
}

Finding is one problem.

func Check

func Check(p *compose.Project, project, worktree string) []Finding

Check lints p, the configuration of project, whose worktree is the directory every relative bind mount lives in.

Jump to

Keyboard shortcuts

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