package findcall

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

Package findcall defines an Analyzer that serves as a trivial example and test of the Analysis API. It reports a diagnostic for every call to a function or method of the name specified by its -name flag. It also exports a fact for each declaration that matches the name, plus a package-level fact if the package contained one or more such declarations.

Index

Constants

const Doc = `find calls to a particular function

The findcall analysis reports calls to functions or methods
of a particular name.`

Variables

var Analyzer = &analysis.Analyzer{
	Name:             "findcall",
	Doc:              Doc,
	URL:              "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/findcall",
	Run:              run,
	RunDespiteErrors: true,
	FactTypes:        []analysis.Fact{new(foundFact)},
}

Source Files

findcall.go

Directories

PathSynopsis
go/analysis/passes/findcall/cmd
go/analysis/passes/findcall/cmd/findcallThe findcall command runs the findcall analyzer.
Version
v0.30.0 (latest)
Published
Feb 10, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
3 hours ago

Tools for package owners.