Check that the package's own dependencies are quoted in Title/Description
Source:R/check-quoted-software-names.R
cl_check_quoted_software_names.RdFlags a package name from this package's own Depends/Imports/
Suggests/LinkingTo fields (excluding "R" itself) that appears
unquoted in the Title or Description field. Per the CRAN Cookbook,
software and package names should be wrapped in single quotes so the
automatic spell check doesn't flag them.
Details
The candidate list is deliberately narrow: rather than a general list
of known software/API names (high false-positive risk – see
.agents/PLAN.md), it's limited to packages this package actually
declares a dependency on, which keeps precision high. It also means the
check under-reports (e.g. it won't catch an unquoted "Python"). A plain
word matching a dependency's name doesn't always refer to the package
either, so findings are advisory rather than a firm "fix this."
Examples
pkg_dir <- cl_example_pkg(
description = c(
Description = paste(
"Wraps jsonlite for convenient parsing.",
"It has no other dependencies."
),
Imports = "jsonlite"
)
)
cl_check_quoted_software_names(pkg_dir)
#> # A tibble: 1 × 6
#> check file line severity message policy_reference
#> <chr> <chr> <int> <ord> <chr> <chr>
#> 1 quoted_software_names DESCRIPTION NA advisory "\"jsonlite… https://contrib…
unlink(pkg_dir, recursive = TRUE)