lint

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintLinters

func PrintLinters()

PrintLinters prints out all linters to stdout.

func Run

func Run(dir string, enable string, disable string, args ...string) error

Run starts the linter in the provided directory with the specified arguments. If enable is not empty, it is treated as a whitelist. If disable is not empty, it is treated as a blacklist.

Types

type Linter

type Linter struct {
	*loader.Loader
	Err scanner.ErrorList
	// contains filtered or unexported fields
}

Linter is a struct that holds the state of the linter.

func New

func New(dir string) *Linter

New creates a new initialized linter instance.

func (Linter) PrintErrors

func (l Linter) PrintErrors() int

PrintErrors print the errors the linter accumulated and returns the amount of errors that have been printed.

Jump to

Keyboard shortcuts

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