toolshonnef.co/go/tools/lint/lintdsl Index | Files

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

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 Inspect(node ast.Node, fn func(node ast.Node) bool)

func Match

func Match(pass *analysis.Pass, q pattern.Pattern, node ast.Node) (*pattern.Matcher, bool)

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.6
Published
Oct 12, 2020
Platform
windows/amd64
Imports
6 packages
Last checked
14 minutes ago

Tools for package owners.