unused

package
Version: v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 18 Imported by: 112

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &lint.Analyzer{
	Doc: &lint.Documentation{
		Title: "Unused code",
	},
	Analyzer: &analysis.Analyzer{
		Name:       "U1000",
		Doc:        "Unused code",
		Run:        run,
		Requires:   []*analysis.Analyzer{buildir.Analyzer, facts.Generated, facts.Directives},
		ResultType: reflect.TypeOf(Result{}),
	},
}
View Source
var Debug io.Writer

Functions

This section is empty.

Types

type Result

type Result struct {
	Used   []types.Object
	Unused []types.Object
}

TODO(dh): should we return a map instead of two slices?

type SerializedObject

type SerializedObject struct {
	Name            string
	Position        token.Position
	DisplayPosition token.Position
	Kind            string
	InGenerated     bool
}

type SerializedResult

type SerializedResult struct {
	Used   []SerializedObject
	Unused []SerializedObject
}

func Serialize

func Serialize(pass *analysis.Pass, res Result, fset *token.FileSet) SerializedResult

Directories

Path Synopsis
Package typemap defines Map, a mapping from types.Type to interface{} values.
Package typemap defines Map, a mapping from types.Type to interface{} values.

Jump to

Keyboard shortcuts

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