Files
bank-fraud-baf-lakehouse/tests/testthat/test-spelling.R
Rob Wiederstein 7a1a8e0053 Add Phase 4: code quality, CI/CD, and formatting
- testthat infrastructure with 15 tests covering env-var guards,
  return types for all format/save functions, and spelling
- inst/WORDLIST with 52 domain terms (LightGBM, MinIO, Parquet, etc.)
- Spelling test wired into devtools::test() via test-spelling.R
- styler::style_file() added as step 0 in deploy.R (auto-fixes before ship)
- .gitea/workflows/test.yaml: runs testthat suite on push
- .gitea/workflows/lint.yaml: lychee link check + styler dry-run on push
- Removed internal IP address from comment in train_production_model()
- Language: en-US added to DESCRIPTION

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 04:41:37 -05:00

13 lines
463 B
R

test_that("no spelling errors in package docs, README, or slides", {
skip_on_cran()
skip_if_not_installed("spelling")
pkg_root <- getwd()
for (i in seq_len(5)) {
if (file.exists(file.path(pkg_root, "DESCRIPTION"))) break
pkg_root <- dirname(pkg_root)
}
skip_if(!file.exists(file.path(pkg_root, "DESCRIPTION")))
errors <- spelling::spell_check_package(pkg_root)
expect_equal(nrow(errors), 0L, info = paste(errors$word, collapse = ", "))
})