package lintdsl
import "honnef.co/go/tools/lint/lintdsl"
Package lintdsl provides helpers for implementing static analysis checks. Dot-importing this package is encouraged.
Index ¶
- func ExhaustiveTypeSwitch(v interface{})
- func Inspect(node ast.Node, fn func(node ast.Node) bool)
- func Match(pass *analysis.Pass, q pattern.Pattern, node ast.Node) (*pattern.Matcher, bool)
- func MatchAndEdit(pass *analysis.Pass, before, after pattern.Pattern, node ast.Node) (*pattern.Matcher, []analysis.TextEdit, bool)
- func Selector(x, sel string) *ast.SelectorExpr
Functions ¶
func ExhaustiveTypeSwitch ¶
func ExhaustiveTypeSwitch(v interface{})
ExhaustiveTypeSwitch panics when called. It can be used to ensure that type switches are exhaustive.
func Inspect ¶
func Match ¶
func MatchAndEdit ¶
func MatchAndEdit(pass *analysis.Pass, before, after pattern.Pattern, node ast.Node) (*pattern.Matcher, []analysis.TextEdit, bool)
func Selector ¶
func Selector(x, sel string) *ast.SelectorExpr
Source Files ¶
lintdsl.go
- Version
- v0.0.1-2020.1.5
- Published
- Jul 30, 2020
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 4 minutes ago –
Tools for package owners.