result

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileResults

type FileResults struct {
	Filename string
	Results  []Result
}

FileResults contains all the Results for the file

func (*FileResults) String

func (fr *FileResults) String() string

type Result

type Result struct {
	Rule          *rule.Rule
	Violation     string
	StartPosition *token.Position
	EndPosition   *token.Position
}

Result contains data about the result of a broken rule

func FindResults

func FindResults(r *rule.Rule, filename, text string, line int) (rs []Result)

FindResults returns the results that match the rule for the given text. filename and line are only used for the Position

func (*Result) Reason

func (r *Result) Reason() string

Reason outputs the suggested alternatives for this rule

func (*Result) String

func (r *Result) String() string

type Results

type Results struct {
	Results []Result
}

Results contains a list of Result

func (*Results) Add

func (rs *Results) Add(r *Result)

Add adds a single Result object onto the Results stack

func (*Results) Output

func (rs *Results) Output()

Output is the logger output of results

func (*Results) Push

func (rs *Results) Push(r ...Result)

Push pushes a list of Result objects onto the Results stack

func (*Results) String

func (rs *Results) String() string

Jump to

Keyboard shortcuts

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