Merging upstream version 2.11.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e1036806b7
commit
b40b2e7e52
33 changed files with 586 additions and 19 deletions
48
testing/resources/r_hooks_repo/.pre-commit-hooks.yaml
Normal file
48
testing/resources/r_hooks_repo/.pre-commit-hooks.yaml
Normal file
|
@ -0,0 +1,48 @@
|
|||
# parsing file
|
||||
- id: parse-file-no-opts-no-args
|
||||
name: Say hi
|
||||
entry: Rscript parse-file-no-opts-no-args.R
|
||||
language: r
|
||||
types: [r]
|
||||
- id: parse-file-no-opts-args
|
||||
name: Say hi
|
||||
entry: Rscript parse-file-no-opts-args.R
|
||||
args: [--no-cache]
|
||||
language: r
|
||||
types: [r]
|
||||
## parsing expr
|
||||
- id: parse-expr-no-opts-no-args-1
|
||||
name: Say hi
|
||||
entry: Rscript -e '1+1'
|
||||
language: r
|
||||
types: [r]
|
||||
- id: parse-expr-args-in-entry-2
|
||||
name: Say hi
|
||||
entry: Rscript -e '1+1' -e '3' --no-cache3
|
||||
language: r
|
||||
types: [r]
|
||||
# real world
|
||||
- id: hello-world
|
||||
name: Say hi
|
||||
entry: Rscript hello-world.R
|
||||
args: [blibla]
|
||||
language: r
|
||||
types: [r]
|
||||
- id: hello-world-inline
|
||||
name: Say hi
|
||||
entry: |
|
||||
Rscript -e
|
||||
'stopifnot(
|
||||
packageVersion("rprojroot") == "1.0",
|
||||
packageVersion("gli.clu") == "0.0.0.9000"
|
||||
)
|
||||
cat(commandArgs(trailingOnly = TRUE), "from R!\n", sep = ", ")
|
||||
'
|
||||
args: ['Hi-there']
|
||||
language: r
|
||||
types: [r]
|
||||
- id: additional-deps
|
||||
name: Check additional deps
|
||||
entry: Rscript additional-deps.R
|
||||
language: r
|
||||
types: [r]
|
19
testing/resources/r_hooks_repo/DESCRIPTION
Normal file
19
testing/resources/r_hooks_repo/DESCRIPTION
Normal file
|
@ -0,0 +1,19 @@
|
|||
Package: gli.clu
|
||||
Title: What the Package Does (One Line, Title Case)
|
||||
Type: Package
|
||||
Version: 0.0.0.9000
|
||||
Authors@R:
|
||||
person(given = "First",
|
||||
family = "Last",
|
||||
role = c("aut", "cre"),
|
||||
email = "first.last@example.com",
|
||||
comment = c(ORCID = "YOUR-ORCID-ID"))
|
||||
Description: What the package does (one paragraph).
|
||||
License: `use_mit_license()`, `use_gpl3_license()` or friends to
|
||||
pick a license
|
||||
Encoding: UTF-8
|
||||
LazyData: true
|
||||
Roxygen: list(markdown = TRUE)
|
||||
RoxygenNote: 7.1.1
|
||||
Imports:
|
||||
rprojroot
|
2
testing/resources/r_hooks_repo/additional-deps.R
Executable file
2
testing/resources/r_hooks_repo/additional-deps.R
Executable file
|
@ -0,0 +1,2 @@
|
|||
suppressPackageStartupMessages(library("cachem"))
|
||||
cat("OK\n")
|
5
testing/resources/r_hooks_repo/hello-world.R
Executable file
5
testing/resources/r_hooks_repo/hello-world.R
Executable file
|
@ -0,0 +1,5 @@
|
|||
stopifnot(
|
||||
packageVersion('rprojroot') == '1.0',
|
||||
packageVersion('gli.clu') == '0.0.0.9000'
|
||||
)
|
||||
cat("Hello, World, from R!\n")
|
27
testing/resources/r_hooks_repo/renv.lock
Normal file
27
testing/resources/r_hooks_repo/renv.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"R": {
|
||||
"Version": "4.0.3",
|
||||
"Repositories": [
|
||||
{
|
||||
"Name": "CRAN",
|
||||
"URL": "https://cloud.r-project.org"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Packages": {
|
||||
"renv": {
|
||||
"Package": "renv",
|
||||
"Version": "0.12.5",
|
||||
"Source": "Repository",
|
||||
"Repository": "CRAN",
|
||||
"Hash": "5c0cdb37f063c58cdab3c7e9fbb8bd2c"
|
||||
},
|
||||
"rprojroot": {
|
||||
"Package": "rprojroot",
|
||||
"Version": "1.0",
|
||||
"Source": "Repository",
|
||||
"Repository": "CRAN",
|
||||
"Hash": "86704667fe0860e4fec35afdfec137f3"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue