René's URL Explorer Experiment


Title: Add dummy go.mod for local "empty" installs by scop · Pull Request #1428 · pre-commit/pre-commit · GitHub

Open Graph Title: Add dummy go.mod for local "empty" installs by scop · Pull Request #1428 · pre-commit/pre-commit

X Title: Add dummy go.mod for local "empty" installs by scop · Pull Request #1428 · pre-commit/pre-commit

Description: Empty local golang installs seem to fail when trying to use go modules in additional_dependencies. Test config: repos: - repo: local hooks: - id: shfmt name: shfmt language: golang additional_dependencies: [mvdan.cc/sh/v3/cmd/shfmt] entry: shfmt args: [-w] types: [shell] - id: misspell name: misspell language: golang additional_dependencies: [github.com/client9/misspell/cmd/misspell] entry: misspell args: [-error] types: [text] 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: An unexpected error has occurred: CalledProcessError: command: ('/usr/bin/go', 'get', 'mvdan.cc/sh/v3/cmd/shfmt') return code: 1 expected return code: 0 stdout: (none) stderr: package mvdan.cc/sh/v3/cmd/shfmt: cannot find package "mvdan.cc/sh/v3/cmd/shfmt" in any of: /usr/lib/go-1.14/src/mvdan.cc/sh/v3/cmd/shfmt (from $GOROOT) /home/scop/.cache/pre-commit/repoetpe3oez/golangenv-default/src/mvdan.cc/sh/v3/cmd/shfmt (from $GOPATH) 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=on in 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.

Open Graph Description: Empty local golang installs seem to fail when trying to use go modules in additional_dependencies. Test config: repos: - repo: local hooks: - id: shfmt name: shfmt langu...

X Description: Empty local golang installs seem to fail when trying to use go modules in additional_dependencies. Test config: repos: - repo: local hooks: - id: shfmt name: shfmt langu...

Opengraph URL: https://github.com/pre-commit/pre-commit/pull/1428

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:01f9c1ab-a690-d4af-d50d-759f9c6ebc39
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDD92:FD8CA:4BAE08:6D67C1:6A55E22E
html-safe-nonce0d08f448109085310d9cb2ba8c330720830a2cb49fb0e1f87fff3fd743ff1fd6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDkyOkZEOENBOjRCQUUwODo2RDY3QzE6NkE1NUUyMkUiLCJ2aXNpdG9yX2lkIjoiMzQzODcyMTIwODkwNDE4MDI3MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc902f030fd772900b60191574ee7b1cb62ab0ceeb7b95451d1f4d96e62fe09ea
hovercard-subject-tagpull_request:412483921
github-keyboard-shortcutsrepository,commits,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/pre-commit/pre-commit/pull/1428/files
twitter:imagehttps://avatars.githubusercontent.com/u/109152?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/109152?s=400&v=4
og:image:altEmpty local golang installs seem to fail when trying to use go modules in additional_dependencies. Test config: repos: - repo: local hooks: - id: shfmt name: shfmt langu...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/pre-commit/pre-commit git https://github.com/pre-commit/pre-commit.git
octolytics-dimension-user_id6943086
octolytics-dimension-user_loginpre-commit
octolytics-dimension-repository_id17689377
octolytics-dimension-repository_nwopre-commit/pre-commit
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id17689377
octolytics-dimension-repository_network_root_nwopre-commit/pre-commit
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3725c7f9b2a6e3a27ef57c5aed13428c0f65e045
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/pre-commit/pre-commit/pull/1428/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpre-commit%2Fpre-commit%2Fpull%2F1428%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpre-commit%2Fpre-commit%2Fpull%2F1428%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=pre-commit%2Fpre-commit
Reloadhttps://github.com/pre-commit/pre-commit/pull/1428/files
Reloadhttps://github.com/pre-commit/pre-commit/pull/1428/files
Reloadhttps://github.com/pre-commit/pre-commit/pull/1428/files
Please reload this pagehttps://github.com/pre-commit/pre-commit/pull/1428/files
pre-commit https://github.com/pre-commit
pre-commithttps://github.com/pre-commit/pre-commit
Please reload this pagehttps://github.com/pre-commit/pre-commit/pull/1428/files
Notifications https://github.com/login?return_to=%2Fpre-commit%2Fpre-commit
Fork 986 https://github.com/login?return_to=%2Fpre-commit%2Fpre-commit
Star 15.4k https://github.com/login?return_to=%2Fpre-commit%2Fpre-commit
Code https://github.com/pre-commit/pre-commit
Issues 22 https://github.com/pre-commit/pre-commit/issues
Pull requests 13 https://github.com/pre-commit/pre-commit/pulls
Actions https://github.com/pre-commit/pre-commit/actions
Security and quality 0 https://github.com/pre-commit/pre-commit/security
Insights https://github.com/pre-commit/pre-commit/pulse
Code https://github.com/pre-commit/pre-commit
Issues https://github.com/pre-commit/pre-commit/issues
Pull requests https://github.com/pre-commit/pre-commit/pulls
Actions https://github.com/pre-commit/pre-commit/actions
Security and quality https://github.com/pre-commit/pre-commit/security
Insights https://github.com/pre-commit/pre-commit/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpre-commit%2Fpre-commit%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpre-commit%2Fpre-commit%2Fissues%2Fnew%2Fchoose
asottilehttps://github.com/asottile
pre-commit:masterhttps://github.com/pre-commit/pre-commit/tree/master
scop:golang-empty-dummy-modulehttps://github.com/scop/pre-commit/tree/golang-empty-dummy-module
Conversation 7 https://github.com/pre-commit/pre-commit/pull/1428
Commits 1 https://github.com/pre-commit/pre-commit/pull/1428/commits
Checks 0 https://github.com/pre-commit/pre-commit/pull/1428/checks
Files changed https://github.com/pre-commit/pre-commit/pull/1428/files
Please reload this pagehttps://github.com/pre-commit/pre-commit/pull/1428/files
Add dummy go.mod for local "empty" installs https://github.com/pre-commit/pre-commit/pull/1428/files#top
Show all changes 1 commit https://github.com/pre-commit/pre-commit/pull/1428/files
e2ed732 Add dummy go.mod for local "empty" installs scop May 2, 2020 https://github.com/pre-commit/pre-commit/pull/1428/commits/e2ed73209a64dba018af05b325e671d4b310416a
Clear filters https://github.com/pre-commit/pre-commit/pull/1428/files
Please reload this pagehttps://github.com/pre-commit/pre-commit/pull/1428/files
Please reload this pagehttps://github.com/pre-commit/pre-commit/pull/1428/files
empty_template_go.mod https://github.com/pre-commit/pre-commit/pull/1428/files#diff-eaed3d5eea1ef8b21458148047aa4ce6c52453fc41559219870293142b683713
store.py https://github.com/pre-commit/pre-commit/pull/1428/files#diff-a52ef0cf627ce783529c259e63d4ea82b77520936a2455cbf4f90ad2fb36d27d
pre_commit/resources/empty_template_go.modhttps://github.com/pre-commit/pre-commit/pull/1428/files#diff-eaed3d5eea1ef8b21458148047aa4ce6c52453fc41559219870293142b683713
View file https://github.com/scop/pre-commit/blob/e2ed73209a64dba018af05b325e671d4b310416a/pre_commit/resources/empty_template_go.mod
Open in desktop https://desktop.github.com
pre_commit/store.pyhttps://github.com/pre-commit/pre-commit/pull/1428/files#diff-a52ef0cf627ce783529c259e63d4ea82b77520936a2455cbf4f90ad2fb36d27d
View file https://github.com/scop/pre-commit/blob/e2ed73209a64dba018af05b325e671d4b310416a/pre_commit/store.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1428/{{ revealButtonHref }}
https://github.com/pre-commit/pre-commit/pull/1428/files#diff-a52ef0cf627ce783529c259e63d4ea82b77520936a2455cbf4f90ad2fb36d27d
https://github.com/pre-commit/pre-commit/pull/1428/files#diff-a52ef0cf627ce783529c259e63d4ea82b77520936a2455cbf4f90ad2fb36d27d
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.