[checklock] integration into golangci-linter
jerome-laforge opened this issue · comments
Description
According to golangci/golangci-lint#2479 and in order to increase the usage of the linter checklock, is it possible to make checklock as independent module?
Is this feature related to a specific bug?
n/a
Do you have a specific solution in mind?
n/a
I'm not entirely sure what an independent module means. I think there's probably some confusion because the main branch is not a standard Go module. However, the Go branch is an automatically maintained module branch. You can simply refer to the go branch.
I've updated the checklocks README.md with more specific usage: https://github.com/google/gvisor/tree/master/tools/checklocks#installation-and-usage
FWIW, I'm not sure it's a useful general purpose linter since it requires annotations, but hopefully this helps. I suppose it can catch some basic stuff like double locking, but perhaps the suggestions will get annoying?
Let me know if there's something else that can be done here.
I think the request is to add a go.mod to the checklocks folder so it can be imported without importing all of gvisor. I could be wrong though; this was based on golangci/golangci-lint#2479 (comment)