package tests
import "golang.org/x/tools/go/analysis/passes/tests"
Package tests defines an Analyzer that checks for common mistaken usages of tests and examples.
Analyzer tests
tests: check for common mistaken usages of tests and examples
The tests checker walks Test, Benchmark, Fuzzing and Example functions checking malformed names, wrong signatures and examples documenting non-existent identifiers.
Please see the documentation for package testing in golang.org/pkg/testing for the conventions that are enforced for Tests, Benchmarks, and Examples.
Index ¶
Variables ¶
var Analyzer = &analysis.Analyzer{ Name: "tests", Doc: analysisutil.MustExtractDoc(doc, "tests"), URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/tests", Run: run, }
Source Files ¶
doc.go tests.go
- Version
- v0.30.0 (latest)
- Published
- Feb 10, 2025
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 3 hours ago –
Tools for package owners.