-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
Background: The shadow
analyzer aims to report mistakes related to shadowing of local variables, which is a not infrequent source of mistakes in Go. However, the shadow analyzer has at no point in its history gotten remotely close to the signal-to-noise ratio we expect of our static analysis tools, and that's why it was never enabled by default in the old cmd/vet
, nor even included in the vet suite once vet was modularized using the Go analysis framework. Yet we still receive occasional CLs trying to improve the algorithm, and they take time to review.
If anyone wishes to develop their own shadow analyzer, either based on our code or from whole cloth, they are free to do so and we wish them luck; and if they succeed at eliminating false positives (for example, demonstrating a <5% false positive rate on the goalng.org/x repos), we could discuss replacing the current implementation and perhaps even adding it to vet. Until then:
Proposal: We propose to formally deprecate the shadow analyzer on the grounds that it is a failed experiment, and to summarily reject CLs to incrementally improve its algorithm.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status