result

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: MIT Imports: 5 Imported by: 2

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) Len added in v0.1.2

func (fr FileResults) Len() int

Len is part of sort.Interface

func (FileResults) Less added in v0.1.2

func (fr FileResults) Less(i, j int) bool

Less is part of sort.Interface

func (*FileResults) String

func (fr *FileResults) String() string

func (FileResults) Swap added in v0.1.2

func (fr FileResults) Swap(i, j int)

Swap is part of sort.Interface

type Result

type Result struct {
	Rule          *rule.Rule
	Violation     string
	Line          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

Jump to

Keyboard shortcuts

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