Documentation
¶
Overview ¶
Package vet analyzes evaluated Loom designs and their consuming Go module.
Index ¶
Constants ¶
View Source
const ( // RuleRouteOutsideDesign identifies routes registered directly on a Loom mux. RuleRouteOutsideDesign = "route-outside-design" // RuleGeneratedVersionSkew identifies generated output from another Loom version. RuleGeneratedVersionSkew = "generated-version-skew" // RuleServerErrorFault identifies 5xx errors that are not marked as faults. RuleServerErrorFault = "server-error-fault" // RuleRetryableError identifies retryable HTTP statuses without retry metadata. RuleRetryableError = "retryable-error" // RuleDescriptionMinimum identifies index descriptions without a lower bound. RuleDescriptionMinimum = "description-minimum" // RuleDescriptionRange identifies numeric range descriptions without matching bounds. RuleDescriptionRange = "description-range" // RuleStringFormat identifies semantic strings without a format or pattern. RuleStringFormat = "string-format" // RuleNormalizedRange identifies normalized numbers without zero-to-one bounds. RuleNormalizedRange = "normalized-range" )
View Source
const SuppressionMeta = "loom:vet:ignore"
SuppressionMeta is the DSL metadata key used to suppress vet diagnostics.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Diagnostic ¶
type Diagnostic struct {
Rule string `json:"rule"`
Severity Severity `json:"severity"`
Message string `json:"message"`
Location Location `json:"location"`
}
Diagnostic is one actionable Loom adoption finding.
type Format ¶
type Format string
Format identifies a supported vet report encoding.
func ParseFormat ¶
ParseFormat validates a report format name.
type Location ¶
type Location struct {
Path string `json:"path"`
Line int `json:"line,omitempty"`
Column int `json:"column,omitempty"`
}
Location identifies either a Go source position or an evaluated design path.
type Report ¶
type Report struct {
Diagnostics []Diagnostic `json:"diagnostics"`
}
Report contains all diagnostics emitted by one vet run.
func (Report) HasDiagnostics ¶
HasDiagnostics reports whether the report contains findings.
Click to show internal directories.
Click to hide internal directories.