cli

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cli implements the vacuum-extra command: a small, statically linked linter that runs vacuum's engine with every rule of the catalogue registered in-process, so no Go plugin has to be built or matched to a vacuum version.

Index

Constants

View Source
const (
	// ExitOK means the document was linted and nothing at or above the failure
	// severity was found.
	ExitOK = 0
	// ExitFindings means at least one finding reached the failure severity.
	ExitFindings = 1
	// ExitUsage means the command line or the inputs were invalid.
	ExitUsage = 2
)

Exit codes returned by Run.

Variables

View Source
var ErrUsage = errors.New("usage")

ErrUsage is returned for invalid command lines.

Functions

func Run

func Run(args []string, stdout, stderr io.Writer) int

Run executes the command with the given arguments and returns the exit code.

Types

type Finding

type Finding struct {
	Rule     string `json:"rule"`
	Severity string `json:"severity"`
	Path     string `json:"path"`
	Line     int    `json:"line"`
	Column   int    `json:"column"`
	Message  string `json:"message"`
}

Finding is one violation in the machine readable output.

Jump to

Keyboard shortcuts

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