-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
goLint: add a check that go.mod is tidied #102
base: main
Are you sure you want to change the base?
Conversation
056096d
to
a6cb558
Compare
I'm actually worried about this one because recently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worried that this may cause linting errors for most of our repos.
I don't think that's a valid value for >= Go 1.21. This is because they recently changed the naming of the initial Go releases. The documentation states:
It shouldn't add a
I ran
In none of these repos did it introduce any changes. |
Name of feature:
Check that
go.mod
is tidied.Pain or issue this feature alleviates:
There's no reason to commit a
go.mod
that is not tidied.Why is this important to the project (if not answered above):
Best case an untidy
go.mod
pulls in dependencies that are not needed, worst case it leads to build failures due to incorrect module hashes.Is there documentation on how to use this feature? If so, where?
https://go.dev/ref/mod#go-mod-tidy
In what environments or workflows is this feature supported?
All of them.
In what environments or workflows is this feature explicitly NOT supported (if any)?
None.
Supporting links/other PRs/issues:
I've been running this logic in quic-go for a long time.
💔Thank you!