zblint

package
v0.0.0-...-83f582a Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultIgnoreSuffixes = []string{
	".pb.go",
	".pb.gw.go",
	"_string.go",
	"bindata.go",
	"bindata_assetfs.go",
	"static.go",
}

DefaultIgnoreSuffixes lists the file suffixes for which lint results will be filtered out

Functions

This section is empty.

Types

type Part

type Part int

Part enum representing each field in a gometalinter line

const (
	LintFile Part = 1 + iota
	LintLine
	LintColumn
	LintLevel
	LintMessage
	LintLinter
)

The different fields of the gometalinter line

type ZBLint

type ZBLint struct {
	lintflags.Data
	NoMissingComment bool
	IgnoreSuffixes   cli.StringSlice
	// contains filtered or unexported fields
}

ZBLint provides methods for working with cached lint result files

func (*ZBLint) CacheFile

func (l *ZBLint) CacheFile(ctx zbcontext.Context, p *project.Package) (string, error)

CacheFile returns the location of the lint cache file for a given package

func (*ZBLint) HaveResult

func (l *ZBLint) HaveResult(ctx zbcontext.Context, p *project.Package) (bool, error)

HaveResult checks to see if a lint result is available for a given package

func (*ZBLint) LintSetup

func (l *ZBLint) LintSetup(ctx zbcontext.Context) zbcontext.Context

LintSetup must be called before other methods to complete the configuration from the context

func (*ZBLint) ReadResult

func (l *ZBLint) ReadResult(w io.Writer, pr io.Reader, file string) error

ReadResult reads lint results from the Reader and writes the unfiltered data to the file and the filtered data to the Writer

func (*ZBLint) ShowResult

func (l *ZBLint) ShowResult(w io.Writer, cacheFile string) (bool, error)

ShowResult reads data from cacheFile and writes the filtered data to the Writer

Jump to

Keyboard shortcuts

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