vet.sh: linting ineffective in CI
While looking at the https://github.com/googleapis/google-cloud-go/pull/9758 it seems that linting is actually not working for modules. For example, copying locks should have definitely triggered a CI failure, which it did not.
Most go tools work in a single module boundary and should be executed at every root of go.mod. So, either the script or workflow needs fixing. From github actions output it would probably nice if every single module ended up as a separate result to make the distinction clearer. This probably can even be scoped, such that only changes in a particular module are linted.
Similarly, golang.org/x/lint/golint is deprecated and should be replaced with go vet. See the notice on https://pkg.go.dev/golang.org/x/lint.
The fix for making linting work again is trivial, but it needs a coordinated effort to get all the submodules passing the checks.
I created an proof-of-concept alternative script in https://github.com/egonelbre/google-cloud-go/pull/1 -- you probably would need to adjust it to fit Google's needs, but it shows how to run go vet, staticcheck modules in parallel and get a nice output in github.
I should probably mention that issues such as https://github.com/googleapis/google-cloud-go/pull/10067 go unnoticed as a result. These can be easily caught by static linting tools.