lintutil

package
v2.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2018 License: MIT, MIT Imports: 17 Imported by: 0

Documentation

Overview

Package lintutil provides helpers for writing linter command lines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlagSet

func FlagSet(name string) *flag.FlagSet

func Lint

func Lint(cs []lint.Checker, pkgs []string, opt *Options) ([][]lint.Problem, error)

func ProcessArgs

func ProcessArgs(name string, cs []CheckerConfig, args []string)

func ProcessFlagSet

func ProcessFlagSet(confs []CheckerConfig, fs *flag.FlagSet)

Types

type CheckerConfig

type CheckerConfig struct {
	Checker     lint.Checker
	ExitNonZero bool
}

type JSONOutput

type JSONOutput struct {
	// contains filtered or unexported fields
}

func (JSONOutput) Format

func (o JSONOutput) Format(p lint.Problem)

type Options

type Options struct {
	Tags          []string
	LintTests     bool
	Ignores       string
	GoVersion     int
	ReturnIgnored bool
}

type OutputFormatter

type OutputFormatter interface {
	Format(p lint.Problem)
}

type TextOutput

type TextOutput struct {
	// contains filtered or unexported fields
}

func (TextOutput) Format

func (o TextOutput) Format(p lint.Problem)

Jump to

Keyboard shortcuts

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