report

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 13 Imported by: 27

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 MaximumLanguageVersion added in v0.5.0

func MaximumLanguageVersion(vers string) Option

func MaximumStdlibVersion added in v0.5.0

func MaximumStdlibVersion(vers string) Option

func MinimumLanguageVersion added in v0.5.0

func MinimumLanguageVersion(vers string) Option

func MinimumStdlibVersion added in v0.5.0

func MinimumStdlibVersion(vers string) 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
	MinimumLanguageVersion string
	MaximumLanguageVersion string
	MinimumStdlibVersion   string
	MaximumStdlibVersion   string
}

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