Skip to content

Does anybody know a linter that reports deprecated modules. #2598

Answered by Antonboom
zbindenren asked this question in Q&A
Discussion options

You must be logged in to vote

@zbindenren, hi!

I think such a linter will be different from existing in golangci-lint (e.g. depguard or gomodguard). Because it will not work with AST, but it will need to find the dependency in $GOPATH and parse it go.mod (to find // Deprecated: ..., based on spec).

I'm not sure there aren't any pitfalls here.

Isn't it easier to add a check to CI based on the output from go get or go list?
Example: https://stackoverflow.com/a/71217351

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zbindenren
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants