Versions in this module Expand all Collapse all v1 v1.16.1 Feb 9, 2026 v1.16.0 Feb 6, 2026 Changes in this version + type CategoryConfig struct + Enabled *bool + Severity *validation.Severity + func (c *CategoryConfig) UnmarshalYAML(value *yaml.Node) error + type Config struct + Categories map[string]CategoryConfig + CustomRules *CustomRulesConfig + Extends []string + OutputFormat OutputFormat + Rules []RuleEntry + func LoadConfig(r io.Reader) (*Config, error) + func LoadConfigFromFile(path string) (*Config, error) + func NewConfig() *Config + func (c *Config) UnmarshalYAML(value *yaml.Node) error + func (c *Config) Validate() error + type ConfigurableRule interface + ConfigDefaults func() map[string]any + ConfigSchema func() map[string]any + type CustomRulesConfig struct + Paths []string + Timeout time.Duration + type DocGenerator struct + func NewDocGenerator[T any](registry *Registry[T]) *DocGenerator[T] + func (g *DocGenerator[T]) GenerateAllRuleDocs() []*RuleDoc + func (g *DocGenerator[T]) GenerateCategoryDocs() map[string][]*RuleDoc + func (g *DocGenerator[T]) GenerateRuleDoc(rule RuleRunner[T]) *RuleDoc + func (g *DocGenerator[T]) WriteJSON(w io.Writer) error + func (g *DocGenerator[T]) WriteMarkdown(w io.Writer) error + type DocumentInfo struct + Document T + Index *openapi.Index + Location string + func NewDocumentInfoWithIndex[T any](doc T, location string, index *openapi.Index) *DocumentInfo[T] + func NewDocumentInfo[T any](doc T, location string) *DocumentInfo[T] + type DocumentedRule interface + BadExample func() string + FixAvailable func() bool + GoodExample func() string + Rationale func() string + type LintOptions struct + ResolveOptions *references.ResolveOptions + VersionFilter *string + type Linter struct + func NewLinter[T any](config *Config, registry *Registry[T]) *Linter[T] + func (l *Linter[T]) FilterErrors(errs []error) []error + func (l *Linter[T]) Lint(ctx context.Context, docInfo *DocumentInfo[T], preExistingErrors []error, ...) (*Output, error) + func (l *Linter[T]) Registry() *Registry[T] + type Output struct + Format OutputFormat + Results []error + func (o *Output) ErrorCount() int + func (o *Output) FormatJSON() string + func (o *Output) FormatText() string + func (o *Output) HasErrors() bool + type OutputFormat string + const OutputFormatJSON + const OutputFormatText + type Registry struct + func NewRegistry[T any]() *Registry[T] + func (r *Registry[T]) AllCategories() []string + func (r *Registry[T]) AllRuleIDs() []string + func (r *Registry[T]) AllRules() []RuleRunner[T] + func (r *Registry[T]) AllRulesets() []string + func (r *Registry[T]) GetRule(id string) (RuleRunner[T], bool) + func (r *Registry[T]) GetRuleset(name string) ([]string, bool) + func (r *Registry[T]) Register(rule RuleRunner[T]) + func (r *Registry[T]) RegisterRuleset(name string, ruleIDs []string) error + func (r *Registry[T]) RulesetsContaining(ruleID string) []string + type Rule interface + Category func() string + DefaultSeverity func() validation.Severity + Description func() string + ID func() string + Link func() string + Summary func() string + Versions func() []string + type RuleConfig struct + Enabled *bool + ResolveOptions *references.ResolveOptions + Severity *validation.Severity + func (c *RuleConfig) GetSeverity(defaultSeverity validation.Severity) validation.Severity + type RuleDoc struct + BadExample string + Category string + ConfigDefaults map[string]any + ConfigSchema map[string]any + DefaultSeverity string + Description string + FixAvailable bool + GoodExample string + ID string + Link string + Rationale string + Rulesets []string + Summary string + Versions []string + type RuleEntry struct + Disabled *bool + ID string + Match *regexp.Regexp + Severity *validation.Severity + func (r *RuleEntry) UnmarshalYAML(value *yaml.Node) error + type RuleRunner interface + Run func(ctx context.Context, docInfo *DocumentInfo[T], config *RuleConfig) []error