-
-
Notifications
You must be signed in to change notification settings - Fork 51
Add pre-commit config so formatR can be used as a remote hook #101
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
Open
Serene-Arc
wants to merge
14
commits into
yihui:master
Choose a base branch
from
Serene-Arc:precommit_hook
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
67467fd
Add pre-commit config for test
Serene-Arc 6ae3b55
Add renv files
Serene-Arc 0fb521e
Fix settings
Serene-Arc 15b20f8
Add section to README
Serene-Arc a238ce2
Remove renv files
Serene-Arc 071bc3b
Fix error with locking package directory
Serene-Arc 36fa108
Load packages in script
Serene-Arc 778a849
Suppress output
Serene-Arc a42113d
Format script
Serene-Arc ea3d9d1
Simplify and format
Serene-Arc 7595fd0
Go back to parallel processing
Serene-Arc cef4df0
Add note about required packages
Serene-Arc c0e7275
Add file back
Serene-Arc d294a09
Remove variable
Serene-Arc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
^renv$ | ||
^renv\.lock$ | ||
inst/examples | ||
.gitignore | ||
^\.Rproj\.user$ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Sys.setenv(RENV_CONFIG_AUTO_SNAPSHOT = "FALSE") | ||
source("renv/activate.R") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- id: formatr | ||
name: formatR | ||
description: Uses formatR to format R files | ||
entry: Rscript scripts/pre-commit-formatR.R | ||
language: r | ||
types: [text] | ||
files: '.*.[rR]$' | ||
additional_dependencies: [docopt] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"R": { | ||
"Version": "4.3.3", | ||
"Repositories": [ | ||
{ | ||
"Name": "CRAN", | ||
"URL": "https://cran.csiro.au" | ||
} | ||
] | ||
}, | ||
"Packages": { | ||
"renv": { | ||
"Package": "renv", | ||
"Version": "1.0.5", | ||
"Source": "Repository", | ||
"Repository": "CRAN", | ||
"Requirements": [ | ||
"utils" | ||
], | ||
"Hash": "32c3f93e8360f667ca5863272ec8ba6a" | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
library/ | ||
local/ | ||
cellar/ | ||
lock/ | ||
python/ | ||
sandbox/ | ||
staging/ |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.