analyzers/

directory
v4.2.1-rc.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: GPL-3.0

README

Running analyzer unit tests

Analyzers' unit tests are ignored in bazel's build files, and therefore are not being triggered as part of the CI pipeline. Because of this they should be invoked manually when writing a new analyzer or making changes to an existing one. Otherwise, any issues will go unnoticed during the CI build.

The easiest way to run all unit tests for all analyzers is go test ./tools/analyzers/...

Directories

Path Synopsis
Package comparesame implements a static analyzer to ensure that code does not contain comparisons of identical expressions.
Package comparesame implements a static analyzer to ensure that code does not contain comparisons of identical expressions.
Package cryptorand implements a static analyzer to ensure that the crypto/rand package is used for randomness throughout the codebase.
Package cryptorand implements a static analyzer to ensure that the crypto/rand package is used for randomness throughout the codebase.
Package errcheck implements an static analysis analyzer to ensure that errors are handled in go code.
Package errcheck implements an static analysis analyzer to ensure that errors are handled in go code.
Package featureconfig implements a static analyzer to prevent leaking globals in tests.
Package featureconfig implements a static analyzer to prevent leaking globals in tests.
Package ineffassign implements a static analyzer to ensure that there are no ineffectual assignments in source code.
Package ineffassign implements a static analyzer to ensure that there are no ineffectual assignments in source code.
Package interfacechecker implements a static analyzer to prevent incorrect conditional checks on select interfaces.
Package interfacechecker implements a static analyzer to prevent incorrect conditional checks on select interfaces.
Package logruswitherror implements a static analyzer to ensure that log statements do not use errors in templated log statements.
Package logruswitherror implements a static analyzer to ensure that log statements do not use errors in templated log statements.
Package maligned implements a static analyzer to ensure that Go structs take up the least possible memory.
Package maligned implements a static analyzer to ensure that Go structs take up the least possible memory.
Package nop implements a static analyzer to ensure that code does not contain no-op instructions.
Package nop implements a static analyzer to ensure that code does not contain no-op instructions.
Package properpermissions implements a static analyzer to ensure that Prysm does not use ioutil.MkdirAll or os.WriteFile as they are unsafe when it comes to guaranteeing file permissions and not overriding existing permissions.
Package properpermissions implements a static analyzer to ensure that Prysm does not use ioutil.MkdirAll or os.WriteFile as they are unsafe when it comes to guaranteeing file permissions and not overriding existing permissions.
Package shadowpredecl implements a static analyzer which disallows declaring constructs that shadow predeclared Go identifiers by having the same name.
Package shadowpredecl implements a static analyzer which disallows declaring constructs that shadow predeclared Go identifiers by having the same name.
Package slicedirect implements a static analyzer to ensure that code does not contain applications of [:] on expressions which are already slices.
Package slicedirect implements a static analyzer to ensure that code does not contain applications of [:] on expressions which are already slices.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL