vet

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 16 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 vet holds vis vet's checks, as go/analysis analyzers: the mistakes in using vis that compile and run but are wrong. Each says how to fix it. Test files are not checked: tests declare objectives and rules freely, often wrong on purpose.

Index

Constants

This section is empty.

Variables

Analyzers are vis vet's checks, in the order they run.

View Source
var Directives = &analysis.Analyzer{
	Name: "visdirectives",
	Doc:  "check // vis: directives and that vis_gen.go is up to date with them",
	Run:  runDirectives,
}

Directives checks every // vis: directive, as vis gen reads them, and that vis_gen.go is what they generate.

View Source
var KnobInit = &analysis.Analyzer{
	Name: "visknobinit",
	Doc:  "check that knobs aren't read, or copied before vis gen declares them, during package initialization",
	Run:  runKnobInit,
}

KnobInit checks for knobs read during package initialization, and for knobs and gauges vis gen declares being used before its init runs.

View Source
var Rules = &analysis.Analyzer{
	Name: "visrules",
	Doc:  "check vis.RuleSpec literals against their knob and what they watch",
	Run:  runRules,
}

Rules checks hand-written rules: a knob rules may change, and a threshold and dead band in the unit of what the rule watches.

View Source
var SLOs = &analysis.Analyzer{
	Name: "visslos",
	Doc:  "check that each SLO, and each route a rule watches, names a route its package registers",
	Run:  runSLOs,
}

SLOs checks that an objective names a route a handler in its package is registered under.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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