Diagnose Double-Quoted Software Names
Source:R/diagnostics-description-names.R
lab_description_quoted_quotes.RdFlags a software name in double quotes in Title or Description. Writing R Extensions reserves double quotes for quotations and requires single quotes for software names, so scare-quoted jargon is left alone. A lower-case span matches only a name written in lower case, such as shiny, so an English "rust" or a parameter "r" is not read as Rust or R. In the Title, where Title Case capitalises every word, a capitalised "Bugs" is likewise the word and not BUGS.
Arguments
- path
Character. Path to the package directory. Default:
".".- verbose
Logical. Print diagnostic output. Default:
TRUE.- desc
Optional pre-parsed
DESCRIPTION, as returned bybase::read.dcf(). Defaults to reading it frompath.
Value
checktor_check_result() with passed, issues, message.
Details
The names are those lab_software_names() and lab_language_names() ask to
see in single quotes, and a few more. Format names such as JSON or HTML,
which CRAN accepts bare, are not among them, so one in double quotes is not
reported; lab_format_names() reports them bare, on request.
Source
Writing R Extensions,
under "The DESCRIPTION file", reserves double quotes for book
titles and similar; software names take single quotes. See
vignette("check-sources", package = "checktor") for how every check maps to its
source.
See also
checktor(), which runs this and every other check.
Examples
pkg <- example_diagnose_scenario("description_examples/description_quoted_quotes_bad.txt",
show_content = FALSE)
lab_description_quoted_quotes(pkg, verbose = FALSE)$issues
#> [1] "Description: \"ggplot2\" is a software name in double quotes (Writing R Extensions reserves double quotes for quotations; use single quotes for software and package names)"
unlink(pkg, recursive = TRUE)