chore(deps): update dependency dominikh/go-tools to v2025 #3351
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.6.0->2025.1.1Release Notes
dominikh/go-tools (dominikh/go-tools)
v2025.1.1: Staticcheck 2025.1.1 (v0.6.1)Compare Source
This is a re-release of 2025.1 but with prebuilt binaries that have been built with Go 1.24.1.
v2025.1: Staticcheck 2025.1 (v0.6.0)Compare Source
Added Go 1.24 support
This release adds support for Go 1.24.
Checks
Changed checks
The following checks have been improved:
v2024.1.1: Staticcheck 2024.1.1 (v0.5.1)Compare Source
This release fixes the detection of the used Go version when Go was compiled with experimental features such as
rangefuncorboringcrypto(#1586).v2024.1: Staticcheck 2024.1 (v0.5.0)Compare Source
Backwards incompatible changes
Staticcheck 2024.1 contains the following backwards incompatible changes:
keyifyutility has been removed. The recommended alternative is gopls.staticcheck -mergenow exits with a non-zero status if any problems have been found.Improved Go 1.22 support
This release updates Staticcheck’s database of deprecated standard library APIs to cover the Go 1.22 release. Furthermore, checks have been updated to correctly handle the new “for” loop variable scoping behavior as well as ranging over integers.
Added Go 1.23 support
Staticcheck 2024.1 has full support for iterators / range-over-func. Furthermore, SA1015 will skip any code targeting Go 1.23 or newer, as it is now possible to use
time.Tickwithout leaking memory.Improved handling of Go versions
Go 1.21 more rigorously defined the meaning of the
godirective ingo.modfiles, as well as its interactions with//go:build go1.Nbuild constraints. The go directive now specifies a minimum Go version for the module. Furthermore, it sets the language version that is in effect, which may change the semantics of Go code. For example, before Go 1.22, loop variables were reused across iterations, but since Go 1.22, loop variables only exist for the duration of an iteration. Modules that specifygo 1.22will use the new semantics, while modules that specify an older version will not.Individual files can both upgrade and downgrade their language version by using
//go:build go1.Ndirectives. In a module that requires Go 1.22, a file specifying Go 1.21 will experience the old loop variable semantics, and vice versa. Because the Go module as a whole still specifies a minimum version, even files specifying an older version will have access to the standard library of the minimum version.Staticcheck 2024.1 takes all of this into consideration when analyzing the behavior of Go code, when determining which checks are applicable, and when making suggestions. Older versions of Staticcheck were already aware of Go versions, but 2024.1 works on a more fine-grained, per-file basis, and differentiates between the pre- and post-1.21 semantics of the go directive.
The
-gocommand line flag continues to exist. It will override any module-based version selection. This is primarily useful for Go modules that target older Go versions (because here, the go directive didn’t specify a minimum version), or when working outside of Go modules.To prevent misinterpreting code, Staticcheck now refuses to analyze modules that require a version of Go that is newer than that with which Staticcheck was built.
Checks
New checks
The following checks have been added:
errors.Iswhere the two arguments have been swapped.io.WriteString(w, string(b))as it would be both simpler and more efficient to usew.Write(b).Changed checks
The following checks have been improved:
len(x) > 0aslen(x) == 0(issue 1422).if elsebranches (issue 1447).struct{}) as context keys (issue 1504).mathpackage (issue 1470).Miscellaneous changes and fixes
keyifyutility has been deleted. This functionality is provided by gopls nowadays.staticcheck -mergenow exits with a non-zero exit status if any problems were found. This matches the behavior of non-merge uses.staticcheck.conffiles now cause more useful errors to be emitted.v2023.1.7: Staticcheck 2023.1.7 (v0.4.7)Compare Source
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.
v2023.1.6: Staticcheck 2023.1.6 (v0.4.6)Compare Source
This release fixes the following bugs:
v2023.1.5: Staticcheck 2023.1.5 (v0.4.5)Compare Source
This release fixes the following bug:
_v2023.1.4: Staticcheck 2023.1.4 (v0.4.4)Compare Source
This release adds support for Go 1.21 and fixes the following bugs:
[]int{1<<31: 1}(#1393)v2023.1.3: Staticcheck 2023.1.3 (v0.4.3)Compare Source
This release fixes the following bugs:
v2023.1.2: Staticcheck 2023.1.2 (v0.4.2)Compare Source
This release fixes a bug that prevented the
binaryformatter from working (issue 1370).v2023.1.1: Staticcheck 2023.1.1 (v0.4.1)Compare Source
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.Seedhas been deprecated in Go 1.20, but an alternative has existed since Go 1.0. In the past, we would flag uses ofSeedeven 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, forSeedbefore 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.v2023.1: Staticcheck 2023.1 (v0.4.0)Compare Source
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:
Staticcheck now knows about version 2 of the k8s.io/klog package, in particular which functions abort control flow (issue 1307).
In addition to these minor improvements, U1000 has been rewritten from the ground up, operating on a program representation more suited to the task. In practice this means that there will be fewer false positives and more true positives.
Overall, the rewrite fixes at least eight known bugs, both ones that have been a nuisance for a while, as well as ones newly introduced by generics (issue 507, issue 633, issue 810, issue 812, issue 1199, issue 1249, issue 1282, issue 1333).
v2022.1.2: Staticcheck 2022.1.2 (v0.3.2)Compare Source
This release addresses the following false positives, crashes, infinite loops, and performance issues:
lenfor the builtin (issue 1181)switchstatements if their order is significant due to the use offallthrough(issue 1188)_has been fixed (issue 1268)string | []bytehas been fixed (issue 1270)Additionally it is strongly recommended to use Go 1.18.2 for building Staticcheck, as it fixes further generics-related bugs in the type checker.
v2022.1.1: Staticcheck 2022.1.1 (v0.3.1)Compare Source
This release addresses the following false positives, crashes, and infinite loops:
v2022.1: Staticcheck 2022.1 (v0.3.0)Compare Source
Staticcheck 2022.1 adds support for Go 1.18 and generics, adds and tweaks some checks, and introduces the new
-matrixand-mergeflags.Read the full release notes at https://staticcheck.io/changes/2022.1
v2021.1.2: Staticcheck 2021.1.2 (v0.2.2)Compare Source
This release fixes some false positives and crashes.
Read the full release notes at https://staticcheck.io/changes/2021.1/#2021.1.2
v2021.1.1: Staticcheck 2021.1.1 (v0.2.1)Compare Source
This release adds support for new language features in Go 1.17, namely conversions from slices to array pointers, the unsafe.Add function, and the unsafe.Slice function.
Additionally, it fixes some false positives.
Read the full release notes at https://staticcheck.io/changes/2021.1#2021.1.1
v2021.1: Staticcheck 2021.1 (v0.2.0)Compare Source
Read the full release notes at https://staticcheck.io/changes/2021.1
v2020.2.4: Staticcheck 2020.2.4 (v0.1.4)Compare Source
This release fixes a crash and some false positives.
Read the full release notes at https://staticcheck.io/changes/2020.2#2020.2.4
v2020.2.3: Staticcheck 2020.2.3 (v0.1.3)Compare Source
This release fixes a false positive in U1000. See #942 for details.
v2020.2.2: Staticcheck 2020.2.2 (v0.1.2)Compare Source
This release fixes a rare crash in Staticcheck, reduces the number of false positives, and adds support for Go 1.16's
io/fs.FileModetype.Read the full release notes at https://staticcheck.io/changes/2020.2#2020.2.2
v2020.2.1: Staticcheck 2020.2.1 (v0.1.1)Compare Source
This release eliminates some false negatives as well as false positives, makes the
staticcheckcommand less noisy and fixes a potential security issue.See the full release notes at https://staticcheck.io/changes/2020.2#2020.2.1
v2020.2: Staticcheck 2020.2 (v0.1.0)Compare Source
Read the full release notes at https://staticcheck.io/changes/2020.2
v2020.1.6: Staticcheck 2020.1.6Compare Source
This release makes the following fixes and improvements:
// Code generated DO NOT EDIT.v2020.1.5: Staticcheck 2020.1.5Compare Source
This release fixes a crash in the pattern matching engine and a false positive in SA4006.
v2020.1.4: Staticcheck 2020.1.4Compare Source
This release adds special handling for imports of the deprecated
github.com/golang/protobuf/protopackage.github.com/golang/protobufhas deprecated theprotopackage, but theirprotoc-gen-gostill imports the package and uses one of its constants, "to enforce a weak dependency on a sufficiently new version of the legacy package".Staticcheck would flag the import of this deprecated package in all code generated by protoc-gen-go. Instead of forcing the project to change their project structure, we choose to ignore such imports in code generated by protoc-gen-go. The import still gets flagged in code not generated by protoc-gen-go.
You can find more information about this in the upstream issue.
v2020.1.3: Staticcheck 2020.1.3Compare Source
This release fixes two bugs involving
//lint:ignoredirectives:v2020.1.2: Staticcheck 2020.1.2Compare Source
Staticcheck 2020.1(.2) contains UI improvements, speed enhancements,
numerous new and improved checks, and support for the upcoming Go
1.14.
Read the full release notes at https://staticcheck.io/changes/2020.1
(2020.1.2 differs from 2020.1.1 and 2020.1 in that it actually
displays the correct version information.)
v2019.2.3: Staticcheck 2019.2.3Compare Source
Staticcheck 2019.2.3 is a re-release of 2019.2.2. Its pre-built binaries have been built with Go 1.13, to enable checking of code that uses language features introduced in Go 1.13.
v2019.2.2: Staticcheck 2019.2.2Compare Source
Staticcheck 2019.2.2 contains the following user-visible fixes:
-tagscommand line argument ineffective, making it impossible to pass in build tags. This is now possible again.v0.0.1-<year>.<minor>instead ofv0.0.0-<year>.<minor>. This fixes an issue wherego getwould prefer an older commit over a newer released version due to the way versions sort.v2019.2.1: Staticcheck 2019.2.1Compare Source
The 2019.2 release has an unfortunate bug that prevents staticcheck from running on 32-bit architectures, causing it to crash unconditionally. This release fixes that crash.
v2019.2: Staticcheck 2019.2Compare Source
Staticcheck 2019.2 brings impressive performance improvements, many new and improved checks, and various small improvements to its command line.
Read the full changelog at https://staticcheck.io/changes/2019.2
v2019.1.1: Staticcheck 2019.1.1Compare Source
The 2019.1.1 release fixes some minor bugs and improves the performance of the U1000 check:
v2019.1: Staticcheck 2019.1Compare Source
Staticcheck 2019.1 makes some major changes to the structure of the tools. Please make sure to read the full changelog before deploying it.
v2017.2.2: Staticcheck 2017.2.2Compare Source
Staticcheck 2017.2.2 fixes minor issues in unused, keyify and staticcheck:
-exportedflag.package foo_test)v2017.2.1: Staticcheck 2017.2.1Compare Source
Staticcheck 2017.2.1 fixes a small bug in the detection of deprecated objects, because of course no release can go without bugs!
The (admittedly very short) full changelog:
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.