Skip to content

Commit 7cd3a0e

Browse files
committed
fix linters
1 parent ea93d0e commit 7cd3a0e

4 files changed

Lines changed: 14 additions & 4 deletions

File tree

R/autoqmd_dependency_stamp.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#' \dontrun{
2323
#' autoqmd_dependency_stamp("species_template.qmd")
2424
#' }
25-
autoqmd_dependency_stamp <- function(file = NULL, quiet = FALSE) {
25+
autoqmd_dependency_stamp <- function(file = NULL, quiet = FALSE) { # nolint: cyclocomp_linter
2626
# If no valid file -> fallback to current time
2727
if (is.null(file) || !file.exists(file)) {
2828
return(sprintf("<!-- DEPENDENCY-MTIME: %s -->",

tests/testthat/test-autoqmd_cleanup.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ writeLines(c(
1414
"line2"
1515
), qmd2)
1616

17-
test_that("autoqmd_cleanup replaces autogenerated section with custom message", {
17+
test_that("autoqmd_cleanup replaces section with custom message", {
1818
# Define custom message to insert
1919
msg <- c(
2020
"<!-- This section was autogenerated and removed after render -->",

tests/testthat/test-autoqmd_finalise.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
qmd <- "iris_chapter_copy.qmd"
22
file.copy("iris_chapter.qmd", qmd)
33

4-
test_that("autoqmd_finalise replaces autogenerated section with default message", {
4+
test_that("autoqmd_finalise replaces section with default message", {
55
# Run finalise with default message
66
autoqmd_finalise(qmd_files = qmd)
77

@@ -32,7 +32,7 @@ test_that("autoqmd_finalise replaces autogenerated section with default message"
3232
expect_true(end_line > start_line)
3333
})
3434

35-
test_that("autoqmd_finalise replaces autogenerated section with custom message", {
35+
test_that("autoqmd_finalise replaces section with custom message", {
3636
# Define a custom message
3737
msg <- c(
3838
"> ⚠️ Autogenerated content removed",

vignettes/articles/autoqmd.qmd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ Next, define a template .qmd file that describes the structure of one repeated s
8787

8888
Example: `species_template.qmd`
8989

90+
```{r}
91+
#| echo: false
92+
# nolint start
93+
```
94+
9095
````{text}
9196
### {{species}}
9297
@@ -123,6 +128,11 @@ ggplot(iris_spec_df, aes(x = Sepal.Length, y = Sepal.Width)) +
123128
```
124129
````
125130

131+
```{r}
132+
#| echo: false
133+
# nolint end
134+
```
135+
126136
Each generated child document will be a fully valid `.qmd` file derived from this template. Template files are never rendered directly by Quarto; they are only used as blueprints for generating temporary child documents.
127137

128138
### Step 3: Create pre-render script

0 commit comments

Comments
 (0)