Skip to content

Commit 269ec40

Browse files
Merge branch 'main' into dev-roxygen-nested
2 parents f2ba561 + 9024d8f commit 269ec40

12 files changed

+25
-23
lines changed

.github/workflows/check-full.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
sudo locale-gen zh_CN
5151
echo "LC_ALL=zh_CN" >> $GITHUB_ENV
5252
53-
- uses: actions/checkout@v4
53+
- uses: actions/checkout@v5
5454

5555
- uses: r-lib/actions/setup-pandoc@v2
5656

.github/workflows/check-no-warnings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1515

1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v5
1818

1919
- uses: r-lib/actions/setup-r@v2
2020
with:

.github/workflows/pkgdown.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
env:
2121
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v5
2424

2525
- uses: r-lib/actions/setup-pandoc@v2
2626

.github/workflows/pre-commit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222
with:
2323
access_token: ${{ github.token }}
2424

25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v5
2626
with:
2727
fetch-depth: 0
2828

2929
- name: Set up Python
30-
uses: actions/setup-python@v5.6.0
30+
uses: actions/setup-python@v6.0.0
3131
with:
3232
python-version: "3.13"
3333

.github/workflows/test-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1616

1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919

2020
- uses: r-lib/actions/setup-r@v2
2121
with:

.github/workflows/touchstone-receive.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
config: ${{ steps.read_touchstone_config.outputs.config }}
2525
steps:
2626
- name: Checkout repo
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@v5
2828
with:
2929
fetch-depth: 0
3030

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ default_language_version:
66

77
repos:
88
- repo: https://github.com/lorenzwalthert/precommit
9-
rev: v0.4.3.9009
9+
rev: v0.4.3.9014
1010
hooks:
1111
- id: style-files
1212
args:
@@ -101,7 +101,7 @@ repos:
101101
)$
102102
- id: pkgdown
103103
- repo: https://github.com/pre-commit/pre-commit-hooks
104-
rev: v5.0.0
104+
rev: v6.0.0
105105
hooks:
106106
- id: check-added-large-files
107107
args: ["--maxkb=200"]

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Authors@R:
1616
family = "Patil",
1717
role = "aut",
1818
email = "[email protected]",
19-
comment = c(ORCID = "0000-0003-1995-6531", Twitter = "@patilindrajeets")))
19+
comment = c(ORCID = "0000-0003-1995-6531")))
2020
Description: Pretty-prints R code without changing the user's formatting
2121
intent.
2222
License: MIT + file LICENSE
@@ -52,7 +52,7 @@ Roxygen: list(markdown = TRUE, roclets = c( "rd", "namespace", "collate",
5252
if (rlang::is_installed("pkgapi")) "pkgapi::api_roclet" else {
5353
warning("Please install r-lib/pkgapi to make sure the file API is kept
5454
up to date"); NULL}))
55-
RoxygenNote: 7.3.2
55+
RoxygenNote: 7.3.3
5656
Language: en-US
5757
Config/testthat/edition: 3
5858
Config/testthat/parallel: true

R/rules-line-breaks.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
#' Rule:
44
#' * Principle: Function arguments that consist of a braced expression always
55
#' need to start on a new line
6-
#' * Exception: [...] unless it's the last argument and all other
6+
#' * Exception: unless it's the last argument and all other
77
#' arguments fit on the line of the function call
8-
#' * Exception: [...] or they are named.
8+
#' * Exception: or they are named
99
#' * Extension: Also, expressions following on braced expressions also cause a
10-
#' line trigger.
10+
#' line trigger
1111
#' @keywords internal
1212
#' @examplesIf FALSE
1313
#' tryCatch(

R/transform-code.R

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ transform_code <- function(path, fun, ..., dry) {
3636
#' @inheritParams separate_chunks
3737
#' @keywords internal
3838
transform_mixed <- function(lines, transformer_fun, filetype) {
39+
if (filetype %in% c("Rnw", "Rmd") && !rlang::is_installed("knitr")) {
40+
rlang::abort("{knitr} is required to process vignette files (Rmd, Rnw)")
41+
}
3942
chunks <- separate_chunks(lines, filetype)
4043
chunks$r_chunks <- map(chunks$r_chunks, transform_mixed_non_empty,
4144
transformer_fun = transformer_fun
@@ -168,9 +171,8 @@ get_engine_pattern <- function() {
168171
#' @inheritParams separate_chunks
169172
#' @keywords internal
170173
get_knitr_pattern <- function(filetype) {
171-
if (filetype == "Rnw") {
172-
knitr::all_patterns[["rnw"]]
173-
} else if (filetype == "Rmd") {
174-
knitr::all_patterns[["md"]]
175-
}
174+
switch(filetype,
175+
Rnw = knitr::all_patterns[["rnw"]],
176+
Rmd = knitr::all_patterns[["md"]]
177+
)
176178
}

0 commit comments

Comments
 (0)