lintdsl

package
Version: v0.0.1-2020.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2020 License: MIT, BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package lintdsl provides helpers for implementing static analysis checks. Dot-importing this package is encouraged.

Index

Constants

This section is empty.

Variables

This section is empty.

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

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL