analysis

package
v0.3.29 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHashFromBody

func GetHashFromBody(fset *token.FileSet, node ast.Node) string

func GetHashFromBodyByLine

func GetHashFromBodyByLine(fset *token.FileSet, node ast.Node, line int) string

func GetHashFromBytes

func GetHashFromBytes(object []byte) string

func GetHashFromString

func GetHashFromString(object string) string

func GetPathRelative

func GetPathRelative(path string) string

func Run

func Run(cfg *config.Config, linters ...*Linter) map[string][]Issue

Run analyze source code.

Types

type Issue

type Issue struct {
	Message  string `json:"message"`
	Filename string `json:"filename"`
	Line     int    `json:"line"`
	Hash     string `json:"hash"`
	Severity string `json:"severity"`
	Type     string `json:"type"`
}

Issue problem in analysis.

type Linter

type Linter struct {
	// The Name of the analyzer must be a valid Go identifier
	Name string
	// Run applies the analyzer to a package.
	Run func(*config.Config, []*packages.Package) []Issue
}

Linter describes an analysis function and its options.

Jump to

Keyboard shortcuts

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