golangci

package
v0.0.0-...-8a6543a Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// ignore is a map of package names to regular expressions. Identifiers from a package are
	// checked against its regular expressions and if any of the expressions match the call
	// is not checked.
	Ignore map[string]*regexp.Regexp

	// If blank is true then assignments to the blank identifier are also considered to be
	// ignored errors.
	Blank bool

	// If asserts is true then ignored type assertion results are also checked
	Asserts bool

	// build tags
	Tags []string

	Verbose bool

	// If true, checking of _test.go files is disabled
	WithoutTests bool

	// Excluded functions.
	Exclude map[string]bool
}

Config is a copy of the `errcheck.Checker` with exported `Exclude` field.

type Issue

func Run

func Run(program *loader.Program, checkBlank, checkAsserts bool) ([]Issue, error)

func RunWithConfig

func RunWithConfig(program *loader.Program, c *Config) ([]Issue, error)

RunWithConfig runs the `errchecker` linter with all its options.

Jump to

Keyboard shortcuts

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