Reminder issue: the version of staticcheck linked by gopls does not yet support range over func. staticcheck@master has support, but this is not yet released in a stable version.

Before cutting gopls@v0.16.0, we should guard against running staticcheck analyzers that depend on staticcheck's buildir on code that uses range over func. We did this temporarily for buildssa by injecting a dependency analyzer that fails when it encounters range over func.

(for the record this issue is not meant in any way to rush staticcheck toward a release, but we can and should guard against running staticcheck on code that it doesn't yet support)

CC @adonovan @dominikh

Comment From: gabyhelp

Similar Issues

  • https://github.com/golang/go/issues/67237
  • https://github.com/golang/go/issues/67262

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Comment From: findleyr

Hah, this was already done in https://go.dev/cl/583778 (I thought that just covered buildssa).

Thanks, @gabyhelp!