Documentation
¶
Overview ¶
Foreign-convention detection: the analyzed module's own types are its design responsibility, but a foreign type follows its library's conventions.
Package ptrparam provides a go/analysis analyzer enforcing the gomatic Go immutability standard: function parameters are passed by value, never by pointer, unless a pointer is the pointed-to type's idiomatic calling convention — a standard-library type conventionally passed by pointer (the generated allowlist_std.go, discovered from the toolchain by discover.go: uncopyable types, pointer-only method sets, and types the stdlib's own API passes as *T), the sanctioned CLI framework's *cli.Command (urfave/cli/v3 imposes it in every Action/Before/After signature), or a type parameter (a generic seam whose instantiations the analyzer cannot judge).
Semantic pointer-idiomatic detection: the discovery criteria applied live to any package's types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Analyzer = newAnalyzer()
Analyzer reports pointer parameters that are not idiomatic standard-library types.
var Registration = goyze.Registration{ Name: "ptrparam", Categories: []goyze.Category{"immutability"}, URL: "https://docs.gomatic.dev/yze/go/ptrparam", Analyzer: Analyzer, }
Registration declares this analyzer to the yze framework.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
yze-go-ptrparam
command
Command yze-go-ptrparam runs the ptrparam analyzer as a standalone go/analysis checker (text, -json, and -fix output, and as a `go vet -vettool`).
|
Command yze-go-ptrparam runs the ptrparam analyzer as a standalone go/analysis checker (text, -json, and -fix output, and as a `go vet -vettool`). |