toolsgolang.org/x/tools/go/analysis/passes/unreachable Index | Files

package unreachable

import "golang.org/x/tools/go/analysis/passes/unreachable"

Package unreachable defines an Analyzer that checks for unreachable code.

Analyzer unreachable

unreachable: check for unreachable code

The unreachable analyzer finds statements that execution can never reach because they are preceded by an return statement, a call to panic, an infinite loop, or similar constructs.

Index

Variables

var Analyzer = &analysis.Analyzer{
	Name:             "unreachable",
	Doc:              analysisutil.MustExtractDoc(doc, "unreachable"),
	URL:              "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/unreachable",
	Requires:         []*analysis.Analyzer{inspect.Analyzer},
	RunDespiteErrors: true,
	Run:              run,
}

Source Files

doc.go unreachable.go

Version
v0.9.3
Published
Jun 1, 2023
Platform
js/wasm
Imports
8 packages
Last checked
5 hours ago

Tools for package owners.