Versions in this module Expand all Collapse all v0 v0.1.0 Oct 28, 2026 Changes in this version type Diagnostic + Related []Related + type Related struct + End token.Pos + Message string + Node ast.Node + Pos token.Pos v0.0.2 Oct 27, 2026 Changes in this version + var Categories = []Category + func Interpolate(tmpl string, data Data) string + type Category string + const Correctness + const Nursery + const Pedantic + const Restriction + const Style + const Suspicious + type Context struct + Enabled bool + File *ast.File + Filename string + Fset *token.FileSet + Pkg *types.Package + Rule *Rule + RuleID string + Source []byte + TypesInfo *types.Info + func NewContext(rule *Rule, ruleID string, fset *token.FileSet, file *ast.File, ...) *Context + func (c *Context) Ancestors() []ast.Node + func (c *Context) CalleeFunc(call *ast.CallExpr) *types.Func + func (c *Context) CommentsBefore(pos token.Pos) *ast.CommentGroup + func (c *Context) IsPkgFunc(call *ast.CallExpr, pkgPath string, names ...string) bool + func (c *Context) IsTestFile() bool + func (c *Context) Line(pos token.Pos) int + func (c *Context) ObjectOf(id *ast.Ident) types.Object + func (c *Context) Options(v any) bool + func (c *Context) OwnLine(pos token.Pos) bool + func (c *Context) Parent() ast.Node + func (c *Context) Report(d Diagnostic) + func (c *Context) Snippet(node ast.Node) string + func (c *Context) Text(node ast.Node) string + func (c *Context) TrailingComment(pos token.Pos) *ast.CommentGroup + func (c *Context) TypeOf(expr ast.Expr) types.Type + type Data map[string]string + type Diagnostic struct + Data Data + End token.Pos + Fix *Fix + Help string + Message string + MessageID string + Node ast.Node + Pos token.Pos + type Edit struct + End token.Pos + NewText string + Pos token.Pos + func InsertBefore(pos token.Pos, text string) Edit + func ReplaceNode(node ast.Node, text string) Edit + type Fix struct + Edits []Edit + Kind FixKind + Message string + type FixKind int + const FixDangerous + const FixNone + const FixSafe + const FixSuggestion + func (k FixKind) String() string + type Handler struct + Exit bool + Fn func(ast.Node) + NodeType reflect.Type + func OnExit[N ast.Node](fn func(N)) Handler + func On[N ast.Node](fn func(N)) Handler + type Meta struct + Category Category + Description string + Fixable FixKind + Messages map[string]string + Name string + NeedsTypes bool + type PackageContext struct + Files []*Context + Name string + type Plugin struct + Name string + Rules []*Rule + type Rule struct + AnalyzePackage func(ctx *PackageContext) + Create func(ctx *Context) Visitor + Meta Meta + type Visitor []Handler + func Visit(handlers ...Handler) Visitor