Add dummy go.mod for local "empty" installs#1428
Merged
asottile merged 1 commit intopre-commit:masterfrom May 2, 2020
Merged
Conversation
asottile
reviewed
May 2, 2020
a008606 to
e2ed732
Compare
Member
|
thanks again for fixing this, this has been released as part of v2.4.0 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Empty local golang installs seem to fail when trying to use go modules in additional_dependencies. Test config:
misspell is there just to represent something that's not a go module, and to see this change didn't break it (it didn't).
With pre-commit 2.3.0 shfmt setup fails for me with golang 1.12, 1.13, and 1.14 with:
After this change, it works out of the box for me with go 1.13 and 1.14. For 1.12 this isn't enough, it would additionally need
GO111MODULE=onin the environment, after that it'd work too. I left it out of this PR because I'm not quite sure if it would cause problems with some "conventional" installs pointed to upstream repos that provide a hook config. For this particular test it would not cause any problems with 1.13 or 1.14 though.