Documentation
¶
Overview ¶
Package boolname provides a go/analysis analyzer enforcing the gomatic Go boolean naming standard: boolean identifiers carry an is/has/can/should/will predicate prefix, or an Enabled/Disabled flag suffix. For parameters and named results it offers a mechanical is-prefix rename fix.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "boolname", Doc: "reports boolean identifiers lacking an is/has/can/should/will prefix or an Enabled/Disabled suffix", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
Analyzer reports boolean fields, parameters, and results that are not named as predicates or flags.
View Source
var Registration = goyze.Registration{ Name: "boolname", Categories: []goyze.Category{"naming"}, URL: "https://docs.gomatic.dev/yze/boolname", 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-boolname
command
Command yze-go-boolname runs the boolname analyzer as a standalone go/analysis checker (text and -json output, and as a `go vet -vettool`).
|
Command yze-go-boolname runs the boolname analyzer as a standalone go/analysis checker (text and -json output, and as a `go vet -vettool`). |
Click to show internal directories.
Click to hide internal directories.