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

package sigchanyzer

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

Package sigchanyzer defines an Analyzer that detects misuse of unbuffered signal as argument to signal.Notify.

Analyzer sigchanyzer

sigchanyzer: check for unbuffered channel of os.Signal

This checker reports call expression of the form

signal.Notify(c <-chan os.Signal, sig ...os.Signal),

where c is an unbuffered channel, which can be at risk of missing the signal.

Package sigchanyzer defines an Analyzer that detects misuse of unbuffered signal as argument to signal.Notify.

Index

Variables

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

Analyzer describes sigchanyzer analysis function detector.

Source Files

doc.go sigchanyzer.go

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

Tools for package owners.