From 066c3a504ef94e9fcdf3a133706e59e184dfaa27 Mon Sep 17 00:00:00 2001 From: musvaage <112724366+musvaage@users.noreply.github.com> Date: Thu, 2 Nov 2023 11:39:51 -0500 Subject: [PATCH] Fix typos (#1486) --- .github/SUPPORT.md | 2 +- src/parser2.cpp | 2 +- tests/testthat/_snaps/rd-section.md | 2 +- tests/testthat/_snaps/tag-parser.md | 4 ++-- tests/testthat/test-rd-section.R | 2 +- tests/testthat/test-rd-template.R | 2 +- tests/testthat/test-tag-parser.R | 2 +- vignettes/rd-formatting.Rmd | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index 21ac6299..63723f27 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -42,7 +42,7 @@ roxygen2 issues can be tricky to create a minimal reprex for. There are two gene problem goes away. Once you've done that, sometimes you'll be able to reduce the problem further to a call to `roc_proc_text()` as above. If not, you'll need to make your minimal package available somewhere on the internet - (preferrably github) and link to it in the issue. The more you can do to + (preferably github) and link to it in the issue. The more you can do to make the package as small as possible, the less time it'll take me to find the bug, and the more time I'll have to work on it. diff --git a/src/parser2.cpp b/src/parser2.cpp index 765b7a16..023d7cb3 100644 --- a/src/parser2.cpp +++ b/src/parser2.cpp @@ -117,7 +117,7 @@ cpp11::list tokenise_block(cpp11::strings lines, std::string file, RoxygenLine line((std::string(lines[i]))); if (!line.consumeRoxygenComment()) { - // Incremenet curRow for non-roxygen comments at start of block + // Increment curRow for non-roxygen comments at start of block if (curVal.empty()) curRow++; continue; diff --git a/tests/testthat/_snaps/rd-section.md b/tests/testthat/_snaps/rd-section.md index 3db07a8d..e60f4b25 100644 --- a/tests/testthat/_snaps/rd-section.md +++ b/tests/testthat/_snaps/rd-section.md @@ -1,4 +1,4 @@ -# warn if forgotton colom +# warn if forgotten colon [:4] @section title spans multiple lines. i Did you forget a colon (:) at the end of the title? diff --git a/tests/testthat/_snaps/tag-parser.md b/tests/testthat/_snaps/tag-parser.md index c836fb92..cf3063e5 100644 --- a/tests/testthat/_snaps/tag-parser.md +++ b/tests/testthat/_snaps/tag-parser.md @@ -132,11 +132,11 @@ # tag_inhert checks for valid inherits Code - tag <- roxy_test_tag("foo params sction") + tag <- roxy_test_tag("foo params section") . <- tag_inherit(tag) Condition Warning: - [test.R:1] @test attempts to inherit from unknown type "sction" + [test.R:1] @test attempts to inherit from unknown type "section" # tag_name() checks for valid names diff --git a/tests/testthat/test-rd-section.R b/tests/testthat/test-rd-section.R index 13f4446c..d8de9304 100644 --- a/tests/testthat/test-rd-section.R +++ b/tests/testthat/test-rd-section.R @@ -1,4 +1,4 @@ -test_that("warn if forgotton colom", { +test_that("warn if forgotten colon", { expect_snapshot_warning( roc_proc_text(rd_roclet(), " #' Foo diff --git a/tests/testthat/test-rd-template.R b/tests/testthat/test-rd-template.R index b23e1a86..c0da82b8 100644 --- a/tests/testthat/test-rd-template.R +++ b/tests/testthat/test-rd-template.R @@ -6,7 +6,7 @@ test_that("can find template from name", { file.path(base, "man-roxygen", "UCase.R") ) - # On case-insentive file systems, will find upper case version first + # On case-insensitive file systems, will find upper case version first expect_equal( tolower(template_find(base, "lcase")), tolower(file.path(base, "man-roxygen", "lcase.r")) diff --git a/tests/testthat/test-tag-parser.R b/tests/testthat/test-tag-parser.R index 41b0508d..2ebf7ffa 100644 --- a/tests/testthat/test-tag-parser.R +++ b/tests/testthat/test-tag-parser.R @@ -39,7 +39,7 @@ test_that("tags check for mismatched parents gives useful warnings", { test_that("tag_inhert checks for valid inherits", { expect_snapshot({ - tag <- roxy_test_tag("foo params sction") + tag <- roxy_test_tag("foo params section") . <- tag_inherit(tag) }) }) diff --git a/vignettes/rd-formatting.Rmd b/vignettes/rd-formatting.Rmd index 0f7ee949..6bedea16 100644 --- a/vignettes/rd-formatting.Rmd +++ b/vignettes/rd-formatting.Rmd @@ -302,7 +302,7 @@ Either avoid expensive computations, or turn on knitr caching with `cache = TRUE Make sure to omit the cache from the package with `usethis::use_build_ignore()`. Note that knitr will call the appropriate `print()` or (if available) `knitr::knit_print()` method on the result. -This may geenrate markdown not supported by roxygen2. +This may generate markdown not supported by roxygen2. If needed, override the automatic methods to have your R calls return your own markdown as a character vector, wrapped in `knitr::asis_output()`. ### Chunk options