checkoutput

package
v0.0.0-...-862138a Latest Latest
Warning

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

Go to latest
Published: May 29, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filterer

type Filterer interface {
	Filter(line Issue) (bool, error)
}

func MatcherFilter

func MatcherFilter(matcher matcher.Matcher) Filterer

func MessageRegexpFilter

func MessageRegexpFilter(messagePattern string) Filterer

func NamePathFilter

func NamePathFilter(namePattern string) Filterer

func RelativePathFilter

func RelativePathFilter(relativePathToExclude string) Filterer

type Issue

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

func ApplyFilters

func ApplyFilters(lineInfo []Issue, filters []Filterer) ([]Issue, error)

func ParseIssues

func ParseIssues(reader io.Reader, parser IssueParser, rawLineFilter func(line string) bool) ([]Issue, error)

func (Issue) BaseDir

func (i Issue) BaseDir() string

func (Issue) Message

func (i Issue) Message() string

func (Issue) Path

func (i Issue) Path(pathType pkgpath.Type) (string, error)

func (Issue) String

func (i Issue) String() string

type IssueParser

type IssueParser interface {
	// IsStartToken returns true if the provided line contains a token that signals that it represents a new Issue.
	// If the parser is strictly a line-based one (every line is a new issue), the implementation can always return
	// true.
	IsStartToken(line string) bool

	// ParseSingleIssue parses the provided string and returns the Issue that is parsed from it. The first line of
	// the input must be a line that causes "IsStartToken" to return true. Returns an error if the provided input
	// cannot be parsed as an issue.
	ParseSingleIssue(input string) (Issue, error)
}

type LineParser

type LineParser func(line, rootDir string) (Issue, error)

func DefaultParser

func DefaultParser(pathType pkgpath.Type) LineParser

func MultiLineParser

func MultiLineParser(pathType pkgpath.Type) LineParser

func RawParser

func RawParser() LineParser

func StartAfterFirstWhitespaceParser

func StartAfterFirstWhitespaceParser(pathType pkgpath.Type) LineParser

type SingleLineIssueParser

type SingleLineIssueParser struct {
	LineParser LineParser
	RootDir    string
}

func (*SingleLineIssueParser) IsStartToken

func (p *SingleLineIssueParser) IsStartToken(line string) bool

func (*SingleLineIssueParser) ParseSingleIssue

func (p *SingleLineIssueParser) ParseSingleIssue(input string) (Issue, error)

Jump to

Keyboard shortcuts

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