report

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 11 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayPosition

func DisplayPosition(fset *token.FileSet, p token.Pos) token.Position

func HasRange added in v0.1.4

func HasRange(node Positioner) bool

func Ordinal

func Ordinal(n int) string

func Render

func Render(pass *analysis.Pass, x interface{}) string

func RenderArgs

func RenderArgs(pass *analysis.Pass, args []ast.Expr) string

func Report

func Report(pass *analysis.Pass, node Positioner, message string, opts ...Option)

Types

type Option

type Option func(*Options)

func FilterGenerated

func FilterGenerated() Option

func Fixes

func Fixes(fixes ...analysis.SuggestedFix) Option
func Related(node Positioner, message string) Option

func ShortRange

func ShortRange() Option

type Options

type Options struct {
	ShortRange      bool
	FilterGenerated bool
	Fixes           []analysis.SuggestedFix
	Related         []analysis.RelatedInformation
}

type Positioner

type Positioner interface {
	Pos() token.Pos
}

Jump to

Keyboard shortcuts

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