Menu

analysis package - golang.org/x/tools/go/analysis - Go Packages

pkg.go.dev·3 months ago
#Oyh8YIgl
#url#go#golang#checker#article
Reading 0:00
15s threshold

Package analysis defines the interface between a modular static analysis and an analysis driver program.

Background ¶

A static analysis is a function that inspects a package of Go code and reports a set of diagnostics (typically mistakes in the code), and perhaps produces other results as well, such as suggested refactorings or other facts. An analysis that reports mistakes is informally called a "checker". For example, the printf checker reports mistakes in fmt.Printf format strings.

A "modular" analysis is one that inspects one package at a time but can save information from a lower-level package and use it when inspecting a higher-level package, analogous to separate compilation in a toolchain.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.