From 95e8ca0393bf71f6656563a778de6b1b916216c4 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Sat, 16 May 2026 01:31:47 +0000 Subject: [PATCH 1/3] fix spell check to cover .qmd files; fix typos in opportunities.qmd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The spelling R package only checks .R, .Rmd, and man pages by default, so .qmd files were never checked. Extend tests/spelling.R to also run spell_check_files() over all .qmd files using the existing WORDLIST. Also fix the two typos now caught by the improved check: - "oppenings" → "openings" - "anlyzing" → "analyzing" Co-authored-by: Douglas Ezra Morrison --- opportunities.qmd | 4 ++-- tests/spelling.R | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/opportunities.qmd b/opportunities.qmd index 7fdc061..26efa27 100644 --- a/opportunities.qmd +++ b/opportunities.qmd @@ -16,7 +16,7 @@ We welcome undergraduate students interested in gaining research experience in s - **Programming**: Experience with R or Python. - **Coursework**: Coursework in statistics, biostatistics, and epidemiology is helpful. - **Biology/Public Health**: Interest in infectious diseases, immunology, or public health. -- **Data Analysis**: Experience working with and anlyzing data. +- **Data Analysis**: Experience working with and analyzing data. - **Communication**: Strong written and verbal communication skills. ### How to Apply @@ -63,7 +63,7 @@ We are seeking postdoctoral researchers to join our team and lead cutting-edge r ### Current Openings -No current oppenings. +No current openings. diff --git a/tests/spelling.R b/tests/spelling.R index 295593a..b7d52b0 100644 --- a/tests/spelling.R +++ b/tests/spelling.R @@ -1,4 +1,15 @@ if (requireNamespace("spelling", quietly = TRUE)) { spelling::spell_check_test(vignettes = TRUE, error = FALSE, skip_on_cran = TRUE) + + # Also check Quarto markdown files, which spell_check_test() ignores by default + wordlist <- if (file.exists("inst/WORDLIST")) readLines("inst/WORDLIST") else character() + qmd_files <- list.files(".", pattern = "\\.qmd$", recursive = TRUE, full.names = TRUE) + if (length(qmd_files) > 0) { + results <- spelling::spell_check_files(qmd_files, ignore = wordlist, lang = "en-US") + if (nrow(results) > 0) { + print(results) + stop("Spelling errors found in .qmd files") + } + } } From a707cd5d5a76794484855d4f0982284ce498febd Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Fri, 15 May 2026 20:15:08 -0700 Subject: [PATCH 2/3] fix: wrap long lines in tests/spelling.R to satisfy lintr Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/spelling.R | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/spelling.R b/tests/spelling.R index b7d52b0..7606b1e 100644 --- a/tests/spelling.R +++ b/tests/spelling.R @@ -2,11 +2,24 @@ if (requireNamespace("spelling", quietly = TRUE)) { spelling::spell_check_test(vignettes = TRUE, error = FALSE, skip_on_cran = TRUE) - # Also check Quarto markdown files, which spell_check_test() ignores by default - wordlist <- if (file.exists("inst/WORDLIST")) readLines("inst/WORDLIST") else character() - qmd_files <- list.files(".", pattern = "\\.qmd$", recursive = TRUE, full.names = TRUE) + # Also check .qmd files, which spell_check_test() skips by default + wordlist <- if (file.exists("inst/WORDLIST")) { + readLines("inst/WORDLIST") + } else { + character() + } + qmd_files <- list.files( + ".", + pattern = "\\.qmd$", + recursive = TRUE, + full.names = TRUE + ) if (length(qmd_files) > 0) { - results <- spelling::spell_check_files(qmd_files, ignore = wordlist, lang = "en-US") + results <- spelling::spell_check_files( + qmd_files, + ignore = wordlist, + lang = "en-US" + ) if (nrow(results) > 0) { print(results) stop("Spelling errors found in .qmd files") From 6c9b18f1390f937300721faa8b72b842f36eb06a Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Wed, 3 Jun 2026 15:17:02 -0700 Subject: [PATCH 3/3] test(spelling): document intentional soft/hard failure difference Address @claude review: clarify that the existing vignette/.Rmd check uses error = FALSE (report-only, tolerate pre-existing issues) while the new .qmd check uses stop() (hard fail) on purpose, since .qmd coverage starts clean. Co-Authored-By: Claude Opus 4.8 --- tests/spelling.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/spelling.R b/tests/spelling.R index 7606b1e..837d031 100644 --- a/tests/spelling.R +++ b/tests/spelling.R @@ -1,4 +1,8 @@ if (requireNamespace("spelling", quietly = TRUE)) { + # error = FALSE: the vignette/.Rmd check reports spelling problems but does + # not fail the test run, so pre-existing/tolerated issues there don't block + # CI. The .qmd check below intentionally uses a hard stop() instead: .qmd + # spelling is newly covered and starts clean, so any new error should fail. spelling::spell_check_test(vignettes = TRUE, error = FALSE, skip_on_cran = TRUE)