René's URL Explorer Experiment


Title: Support for R / renv as a language by lorenzwalthert · Pull Request #1799 · pre-commit/pre-commit · GitHub

Open Graph Title: Support for R / renv as a language by lorenzwalthert · Pull Request #1799 · pre-commit/pre-commit

X Title: Support for R / renv as a language by lorenzwalthert · Pull Request #1799 · pre-commit/pre-commit

Description: This PR aims to add 2nd level support for R to pre-commit via the virtual environment manager renv, motivated by isolated dependency management and (hopefully) compatibility with pre-commit.ci for 2nd level languages as outlined in lorenzwalthert/precommit#215. The implementation follows the recently contributed support for conda (#1232) for source code and tests as well as the implementation of the python virtualenv language. Further considerations: Initial tests only run on Linux. I have to add other platforms as we go if this PR is generally approved. I'd appreciate feedback to the questions in the source code comments, in particular on whether or not to remove in_env() as it seems not needed or whether it should be kept for consistency with other languages. Also, let me know if you want certain comments that explain stuff to be removed. Was not sure how much. If this gets through, we probably should add documentation for pre-commit.com. We might want to support file types for R (https://pre-commit.com/#filtering-files-with-types). Before this PR, I was not familiar with the pre-commit code base nor a very avid python user, hence sorry if there are obvious flaws in this PR.

Open Graph Description: This PR aims to add 2nd level support for R to pre-commit via the virtual environment manager renv, motivated by isolated dependency management and (hopefully) compatibility with pre-commit.ci for ...

X Description: This PR aims to add 2nd level support for R to pre-commit via the virtual environment manager renv, motivated by isolated dependency management and (hopefully) compatibility with pre-commit.ci for ...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:6c55d8e1-7672-60a0-1f76-bb6416f24089
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDB46:245004:2AF3105:3E1198D:6A5669FB
html-safe-nonce89ef53424c2a7e315838c4176ee0dff8263f697a2843a5e9d88ce035569db386
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjQ2OjI0NTAwNDoyQUYzMTA1OjNFMTE5OEQ6NkE1NjY5RkIiLCJ2aXNpdG9yX2lkIjoiNDE1MDYwOTczNjExMzc0NDM3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4902db3d08fa5190e97f194ed71fdaeb8741b8cd1c7cfde9d726bd013c0d1bc3
hovercard-subject-tagpull_request:573689426
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/1799/files
twitter:imagehttps://avatars.githubusercontent.com/u/10477073?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/10477073?s=400&v=4
og:image:altThis PR aims to add 2nd level support for R to pre-commit via the virtual environment manager renv, motivated by isolated dependency management and (hopefully) compatibility with pre-commit.ci for ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None1bfcd903bf3318822b10b18a6332fac40d3a21f7d94456dca766ab8fa7328068
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
release37f446b78ad53e6f593aa1a4243b87c76a3428ab
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/pre-commit/pre-commit/pull/1799/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%2F1799%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%2F1799%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/1799/files
Reloadhttps://github.com/pre-commit/pre-commit/pull/1799/files
Reloadhttps://github.com/pre-commit/pre-commit/pull/1799/files
Please reload this pagehttps://github.com/pre-commit/pre-commit/pull/1799/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/1799/files
Notifications https://github.com/login?return_to=%2Fpre-commit%2Fpre-commit
Fork 985 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
lorenzwalthert:renvhttps://github.com/lorenzwalthert/pre-commit/tree/renv
Conversation 32 https://github.com/pre-commit/pre-commit/pull/1799
Commits 1 https://github.com/pre-commit/pre-commit/pull/1799/commits
Checks 0 https://github.com/pre-commit/pre-commit/pull/1799/checks
Files changed https://github.com/pre-commit/pre-commit/pull/1799/files
Please reload this pagehttps://github.com/pre-commit/pre-commit/pull/1799/files
Support for R / renv as a language https://github.com/pre-commit/pre-commit/pull/1799/files#top
Show all changes 1 commit https://github.com/pre-commit/pre-commit/pull/1799/files
f150211 add support for R via renv lorenzwalthert Feb 3, 2021 https://github.com/pre-commit/pre-commit/pull/1799/commits/f1502119a2110ec858b9780eb6a6c04d28e5be6a
Clear filters https://github.com/pre-commit/pre-commit/pull/1799/files
Please reload this pagehttps://github.com/pre-commit/pre-commit/pull/1799/files
Please reload this pagehttps://github.com/pre-commit/pre-commit/pull/1799/files
azure-pipelines.yml https://github.com/pre-commit/pre-commit/pull/1799/files#diff-7915b9b726a397ae7ba6af7b9703633d21c031ebf21682f3ee7e6a4ec52837a5
all.py https://github.com/pre-commit/pre-commit/pull/1799/files#diff-6c60fac377b037fe42418e50e188771cde10a110a4601bec16796c970871e7f7
r.py https://github.com/pre-commit/pre-commit/pull/1799/files#diff-813c025754186e7d7af82275ff89a79dd4bce3f2e037190c30c2f5a1aa1c8a9d
empty_template_renv.lock https://github.com/pre-commit/pre-commit/pull/1799/files#diff-609457c85eb82953ce826adb6642c6376c0c88cbaf6551730021b27b0ae8af68
store.py https://github.com/pre-commit/pre-commit/pull/1799/files#diff-a52ef0cf627ce783529c259e63d4ea82b77520936a2455cbf4f90ad2fb36d27d
gen-languages-all https://github.com/pre-commit/pre-commit/pull/1799/files#diff-7d78e40ef14f3698d939f659bd7a31e399a2ba4ddf0abda725285173bad8386b
get-r.ps1 https://github.com/pre-commit/pre-commit/pull/1799/files#diff-6f1c68190eed35d3c1ff38d2bfd9a2ac9e8ce054eda0055cd53b452afe073880
get-r.sh https://github.com/pre-commit/pre-commit/pull/1799/files#diff-f4463c934f95de8b081d56e92258ebb5e1050881156a3eb4ed89cc5de117ad3d
.pre-commit-hooks.yaml https://github.com/pre-commit/pre-commit/pull/1799/files#diff-2caa6b43e8825cad76ad1bab31cf3886442720b6b5ce472cc5ff28dbb8a2d933
DESCRIPTION https://github.com/pre-commit/pre-commit/pull/1799/files#diff-6119ddd44556b670f243fcdb1ab568fd5be957736562c2f9c0f18a02ff09f86f
additional-deps.R https://github.com/pre-commit/pre-commit/pull/1799/files#diff-dcddab6a33a59e1a846255a6210578e67750758e63104df7b6d2d64a14bf9a96
hello-world.R https://github.com/pre-commit/pre-commit/pull/1799/files#diff-9074e03dfd2a982f14c3662921c857cf47566722fe2117ee28a6df6aa5a6e751
renv.lock https://github.com/pre-commit/pre-commit/pull/1799/files#diff-6d678ec503ce40a277836f425eb9a8feaaff87a60ceba35cb6280f0e6b64011b
r_test.py https://github.com/pre-commit/pre-commit/pull/1799/files#diff-9ce0c02849ff3479bc1bf1410ea3b236f84fae24355da1bd643d57d65b826c88
repository_test.py https://github.com/pre-commit/pre-commit/pull/1799/files#diff-48978ddb5c5e90a058b6380eacdc6aed502b2d4a83aef493dcc1c03bdd3f882b
azure-pipelines.ymlhttps://github.com/pre-commit/pre-commit/pull/1799/files#diff-7915b9b726a397ae7ba6af7b9703633d21c031ebf21682f3ee7e6a4ec52837a5
View file https://github.com/lorenzwalthert/pre-commit/blob/f1502119a2110ec858b9780eb6a6c04d28e5be6a/azure-pipelines.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1799/{{ revealButtonHref }}
https://github.com/pre-commit/pre-commit/pull/1799/files#diff-7915b9b726a397ae7ba6af7b9703633d21c031ebf21682f3ee7e6a4ec52837a5
https://github.com/pre-commit/pre-commit/pull/1799/files#diff-7915b9b726a397ae7ba6af7b9703633d21c031ebf21682f3ee7e6a4ec52837a5
https://github.com/pre-commit/pre-commit/pull/1799/files#diff-7915b9b726a397ae7ba6af7b9703633d21c031ebf21682f3ee7e6a4ec52837a5
pre_commit/languages/all.pyhttps://github.com/pre-commit/pre-commit/pull/1799/files#diff-6c60fac377b037fe42418e50e188771cde10a110a4601bec16796c970871e7f7
View file https://github.com/lorenzwalthert/pre-commit/blob/f1502119a2110ec858b9780eb6a6c04d28e5be6a/pre_commit/languages/all.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1799/{{ revealButtonHref }}
https://github.com/pre-commit/pre-commit/pull/1799/files#diff-6c60fac377b037fe42418e50e188771cde10a110a4601bec16796c970871e7f7
https://github.com/pre-commit/pre-commit/pull/1799/files#diff-6c60fac377b037fe42418e50e188771cde10a110a4601bec16796c970871e7f7
https://github.com/pre-commit/pre-commit/pull/1799/files#diff-6c60fac377b037fe42418e50e188771cde10a110a4601bec16796c970871e7f7
https://github.com/pre-commit/pre-commit/pull/1799/files#diff-6c60fac377b037fe42418e50e188771cde10a110a4601bec16796c970871e7f7
pre_commit/languages/r.pyhttps://github.com/pre-commit/pre-commit/pull/1799/files#diff-813c025754186e7d7af82275ff89a79dd4bce3f2e037190c30c2f5a1aa1c8a9d
View file https://github.com/lorenzwalthert/pre-commit/blob/f1502119a2110ec858b9780eb6a6c04d28e5be6a/pre_commit/languages/r.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1799/{{ revealButtonHref }}
pre_commit/resources/empty_template_renv.lockhttps://github.com/pre-commit/pre-commit/pull/1799/files#diff-609457c85eb82953ce826adb6642c6376c0c88cbaf6551730021b27b0ae8af68
View file https://github.com/lorenzwalthert/pre-commit/blob/f1502119a2110ec858b9780eb6a6c04d28e5be6a/pre_commit/resources/empty_template_renv.lock
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1799/{{ revealButtonHref }}
pre_commit/store.pyhttps://github.com/pre-commit/pre-commit/pull/1799/files#diff-a52ef0cf627ce783529c259e63d4ea82b77520936a2455cbf4f90ad2fb36d27d
View file https://github.com/lorenzwalthert/pre-commit/blob/f1502119a2110ec858b9780eb6a6c04d28e5be6a/pre_commit/store.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1799/{{ revealButtonHref }}
https://github.com/pre-commit/pre-commit/pull/1799/files#diff-a52ef0cf627ce783529c259e63d4ea82b77520936a2455cbf4f90ad2fb36d27d
https://github.com/pre-commit/pre-commit/pull/1799/files#diff-a52ef0cf627ce783529c259e63d4ea82b77520936a2455cbf4f90ad2fb36d27d
testing/gen-languages-allhttps://github.com/pre-commit/pre-commit/pull/1799/files#diff-7d78e40ef14f3698d939f659bd7a31e399a2ba4ddf0abda725285173bad8386b
View file https://github.com/lorenzwalthert/pre-commit/blob/f1502119a2110ec858b9780eb6a6c04d28e5be6a/testing/gen-languages-all
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1799/{{ revealButtonHref }}
https://github.com/pre-commit/pre-commit/pull/1799/files#diff-7d78e40ef14f3698d939f659bd7a31e399a2ba4ddf0abda725285173bad8386b
https://github.com/pre-commit/pre-commit/pull/1799/files#diff-7d78e40ef14f3698d939f659bd7a31e399a2ba4ddf0abda725285173bad8386b
testing/get-r.ps1https://github.com/pre-commit/pre-commit/pull/1799/files#diff-6f1c68190eed35d3c1ff38d2bfd9a2ac9e8ce054eda0055cd53b452afe073880
View file https://github.com/lorenzwalthert/pre-commit/blob/f1502119a2110ec858b9780eb6a6c04d28e5be6a/testing/get-r.ps1
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1799/{{ revealButtonHref }}
testing/get-r.shhttps://github.com/pre-commit/pre-commit/pull/1799/files#diff-f4463c934f95de8b081d56e92258ebb5e1050881156a3eb4ed89cc5de117ad3d
View file https://github.com/lorenzwalthert/pre-commit/blob/f1502119a2110ec858b9780eb6a6c04d28e5be6a/testing/get-r.sh
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1799/{{ revealButtonHref }}
testing/resources/r_hooks_repo/.pre-commit-hooks.yamlhttps://github.com/pre-commit/pre-commit/pull/1799/files#diff-2caa6b43e8825cad76ad1bab31cf3886442720b6b5ce472cc5ff28dbb8a2d933
View file https://github.com/lorenzwalthert/pre-commit/blob/f1502119a2110ec858b9780eb6a6c04d28e5be6a/testing/resources/r_hooks_repo/.pre-commit-hooks.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1799/{{ revealButtonHref }}
testing/resources/r_hooks_repo/DESCRIPTIONhttps://github.com/pre-commit/pre-commit/pull/1799/files#diff-6119ddd44556b670f243fcdb1ab568fd5be957736562c2f9c0f18a02ff09f86f
View file https://github.com/lorenzwalthert/pre-commit/blob/f1502119a2110ec858b9780eb6a6c04d28e5be6a/testing/resources/r_hooks_repo/DESCRIPTION
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1799/{{ revealButtonHref }}
testing/resources/r_hooks_repo/additional-deps.Rhttps://github.com/pre-commit/pre-commit/pull/1799/files#diff-dcddab6a33a59e1a846255a6210578e67750758e63104df7b6d2d64a14bf9a96
View file https://github.com/lorenzwalthert/pre-commit/blob/f1502119a2110ec858b9780eb6a6c04d28e5be6a/testing/resources/r_hooks_repo/additional-deps.R
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1799/{{ revealButtonHref }}
testing/resources/r_hooks_repo/hello-world.Rhttps://github.com/pre-commit/pre-commit/pull/1799/files#diff-9074e03dfd2a982f14c3662921c857cf47566722fe2117ee28a6df6aa5a6e751
View file https://github.com/lorenzwalthert/pre-commit/blob/f1502119a2110ec858b9780eb6a6c04d28e5be6a/testing/resources/r_hooks_repo/hello-world.R
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1799/{{ revealButtonHref }}
testing/resources/r_hooks_repo/renv.lockhttps://github.com/pre-commit/pre-commit/pull/1799/files#diff-6d678ec503ce40a277836f425eb9a8feaaff87a60ceba35cb6280f0e6b64011b
View file https://github.com/lorenzwalthert/pre-commit/blob/f1502119a2110ec858b9780eb6a6c04d28e5be6a/testing/resources/r_hooks_repo/renv.lock
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pre-commit/pre-commit/pull/1799/{{ revealButtonHref }}
Please reload this pagehttps://github.com/pre-commit/pre-commit/pull/1799/files
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.