commit | 9f99e956bf6df99258519c39a4ab17a8c5fb1bfc | [log] [tgz] |
---|---|---|
author | Suzy Mueller <suzmue@golang.org> | Mon Mar 07 14:57:56 2022 -0700 |
committer | Suzy Mueller <suzmue@golang.org> | Thu Mar 10 18:38:22 2022 +0000 |
tree | 2b0a550d518f608dc7da2550b2434116ae2fb575 | |
parent | 7b442e3cf44c6225970170c1e51fa7670bde1da8 [diff] |
go/analysis: add analyzer for f.Add Calls to f.Add must have arguments of the same types as the function signature passed to f.Fuzz (excluding testing.T). This checks that all calls to f.Add in a function declaration have the same number and types. This will have some false positives, because it does not check to see if the call to f.Add is a no-op. This happens if f.Add is called after or in f.Fuzz. This can be fixed by adding a heuristic for when f.Add is a noop. There also should maybe be an analyzer that reports these noop calls to the user. Updates golang/go#51398 Change-Id: I49b2ed19cb55347abb9a48960b83b8376b7e6a1d Reviewed-on: https://go-review.googlesource.com/c/tools/+/390614 Trust: Suzy Mueller <suzmue@golang.org> Run-TryBot: Suzy Mueller <suzmue@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This subrepository holds the source for various packages and tools that support the Go programming language.
Some of the tools, godoc
and vet
for example, are included in binary Go distributions.
Others, including the Go guru
and the test coverage tool, can be fetched with go install
.
Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs.
The easiest way to install is to run go install golang.org/x/tools/...@latest
.
This repository uses prettier to format JS and CSS files.
The version of prettier
used is 1.18.2.
It is encouraged that all JS and CSS code be run through this before submitting a change. However, it is not a strict requirement enforced by CI.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the tools repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/tools/(your subdir):” in the subject line, so it is easy to find.