Sourced from golang.org/x/tools's releases.
gopls/v0.11.0
This is a small release containing new integrations of vulnerability analysis.
Vulnerability analysis for go.mod files can be enabled by configuring the
"vulncheck"
setting to"Imports"
. For more information on vulnerability management, see the Vulnerability Management for Go blog post.Support changes
This release removes support for the
"experimentalUseInvalidMetadata"
setting, as described in the v0.10.0 release. Other settings slated for deprecation in that release remain temporarily supported, but will be removed in v0.12.0.New Features
Analyzing dependencies for vulnerabilities
This release offers two different options for detecting vulnerabilities in dependencies. Both are backed by the Go vulnerability database (https://vuln.go.dev) and complement each other.
- Imports-based scanning, enabled by the
"vulncheck": "Imports"
setting, reports vulnerabilities by scanning the set of packages imported in the workspace. This is fast, but may report more false positives.- Integration of the golang.org/x/vuln/cmd/govulncheck command-line tool performs a more precise analysis based on-call graph reachability, with fewer false positives. Because it is slower to compute, it must be manually triggered by using "Run govulncheck to verify" code actions or the
"codelenses.run_govulncheck"
code lens ongo.mod
files.https://user-images.githubusercontent.com/4999471/206977512-a821107d-9ffb-4456-9b27-6a6a4f900ba6.mp4
Additional checks for the
loopclosure
analyzerThe
loopclosure
analyzer, which reports problematic references from a nested function to a variable of an enclosing loop, has been improved to catch more cases. In particular, it now reports when subtests run in parallel with the loop, a mistake that often results in all but the final test case being skipped.Configuration changes
- The
"vulncheck"
setting controls vulnerability analysis based on the Go vulnerability database. If set to"Imports"
, gopls will compute diagnostics related to vulnerabilities in dependencies, and will present them in go.mod files.- The
"codelenses.run_govulncheck"
setting controls the presence of code lenses that run the govulncheck command, which takes longer but produces more accurate vulnerability reporting based on call-graph reachability.Bug fixes
This version of gopls includes fixes to several bugs, notably:
golang/go#57053
golang/go#55837
golang/go#56450).golang/go#54816
A full list of all issues fixed can be found in the gopls/v0.11.0 milestone. To report a new problem, please file a new issue at https://go.dev/issues/new.
Thank you to our contributors
@Arsen6331
,@SN9NV
,@adonovan
,@bcmills
,@dle8
,@findleyr
,@hyangah
,@pjweinbgo
,@suzmue
gopls/v0.10.1
This release contains a fix for golang/go#56505: a new crash during method completion on variables of type
*error
.
... (truncated)
675bf3c
go.mod: update golang.org/x dependenciesad52c1c
go/ssa/interp: support conversions to slices of named bytes14ec3c0
gopls/doc/contributing.md: document error handling strategiesc495364
go/packages/gopackages: document -mode flag87ad891
gopls/internal/lsp/source/typerefs: move test into _test.go27fd94e
internal/fastwalk: doc formatting fixes (including godoc links)d362be0
gopls/internal/lsp/filecache: reduce GC frequency969078b
Revert "go/analysis: add Sizes that matches gc size
computations"5aa6acb
go/analysis: add Sizes that matches gc size computations5a89a3b
go/vcs: delete