Sourced from honnef.co/go/tools's releases.
Staticcheck 2023.1.7 (v0.4.7)
This release fixes some minor issues in Staticcheck’s intermediate representation. Furthermore, it improves the way QF1003 generates suggested fixes, working around constraints in the language server protocol.
The released binaries for this version have been built with Go 1.22 and should no longer panic when checking code targeting Go 1.22.
Staticcheck 2023.1.6 (v0.4.6)
This release fixes the following bugs:
- A crash when using the upcoming Go 1.22 (issue 1442)
- A false positive in SA9005 when embedding basic types (issue 1443)
Staticcheck 2023.1.5 (v0.4.5)
This release fixes the following bug:
- A crash involving methods named
_
Staticcheck 2023.1.4 (v0.4.4)
This release adds support for Go 1.21 and fixes the following bugs:
- Three crashes when encountering unnecessarily parenthesized statements (#1393, #1400)
- Unnecessarily high memory usage when analyzing composite literals such as
[]int{1<<31: 1}
(#1393)- A false positive in S1011 when appending to a dynamic left-hand side (#1399)
- A crash involving generics (#1410)
- A false positive in SA9001 involving control flow statements (#488)
- A false positive in ST1003, complaining about the names of fuzz functions (#1420)
Staticcheck 2023.1.3 (v0.4.3)
This release fixes the following bugs:
- A crash when embedding type aliases of unnamed types (issue 1361)
- A false positive in U1000, claiming that type aliases are unused (issue 1365)
- A bug in the binary formatter that prevented correct merging behavior for some checks (issue 1372)
Staticcheck 2023.1.2 (v0.4.2)
This release fixes a bug that prevented the
binary
formatter from working (issue 1370).Staticcheck 2023.1.1 (v0.4.1)
This release fixes a crash, a false positive in U1000 (issue 1360) and improves the way deprecated API is flagged (issue 1318).
When targeting a Go version that is older than the version that deprecated an API, SA1019 will no longer flag the use even if there is already an alternative available in the targeted Go version.
For example,
math/rand.Seed
has been deprecated in Go 1.20, but an alternative has existed since Go 1.0. In the past, we would flag uses ofSeed
even if targeting e.g. Go 1.19, to encourage better forwards compatibility. This can lead to unnecessary churn, however, because the correct change may depend on the Go version in use. For example, forSeed
before Go 1.20, the alternative is to use a separate instance ofmath/rand.Rand
, whereas in Go 1.20, a possible alternative is to simply drop the call toSeed
.Staticcheck 2023.1 (v0.4.0)
Staticcheck 2023.1 adds support for Go 1.20, brings minor improvements to various checks, and replaces U1000 with a new implementation.
The following checks have been improved:
... (truncated)
a093f7c
Version 2023.1.7 (v0.4.7)f4d3418
website: add 2023.1.7 release notes917c595
quickfix: backport "QF1003: reorder edits to respect LSP
spec"b1b6abb
go/ir: emit field and index lvals on demand3e57c5d
go/ir: fix miscompilation of <=
statementsd965e98
go/ir: emit Low expression before High in *ast.Slice102ab03
go/ir: don't emit split stores before phi nodes