Skip to content

Staticcheck 2022.1.2 (v0.3.2)

Compare
Choose a tag to compare
@dominikh dominikh released this 17 May 11:32
· 274 commits to master since this release
2022.1.2

This release addresses the following false positives, crashes, infinite loops, and performance issues:

  • For certain packages that contain tens of thousands of types and methods, such as those generated by ygot, Staticcheck now finishes much faster.
  • Several infinite loops when handling recursive type parameters have been fixed
  • S1009 no longer mistakes user-defined functions named len for the builtin (issue 1181)
  • ST1015 no longer reorders switch statements if their order is significant due to the use of fallthrough (issue 1188)
  • SA1013 now detects constants more robustly, avoiding both false negatives and false positives. Furthermore, it makes sure that offending methods implement io.Seeker and doesn’t just rely on the name Seek (issue 1213).
  • SA5008 now understands more third-party extensions to json struct tags
  • A crash involving functions named _ has been fixed (issue 1268)
  • A crash involving slicing type parameters of type string | []byte has been fixed (issue 1270)
  • SA1019 now handles imports of deprecated standard library packages in the same way it handles other deprecated API, taking the targeted Go version into consideration (issue 1117)

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.