summaryrefslogtreecommitdiffstats
path: root/testing/resources/r_hooks_repo/.pre-commit-hooks.yaml
blob: b3545d969370857cf9a718f33b05440e7c2dee7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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]