Check that DESCRIPTION's Title field is in Title Case
Source:R/check-title-case.R
cl_check_title_case.RdCompares the Title field against tools::toTitleCase()'s suggestion
and flags a mismatch. Title Case judgement genuinely depends on author
intent (proper nouns, quoted software names, etc. keep their original
casing), so treat a finding as a prompt to review rather than an
automatic rewrite.
Examples
pkg_dir <- cl_example_pkg(
description = c(Title = "an example package")
)
cl_check_title_case(pkg_dir)
#> # A tibble: 1 × 6
#> check file line severity message policy_reference
#> <chr> <chr> <int> <ord> <chr> <chr>
#> 1 title_case DESCRIPTION NA should_fix "Title does not matc… https://contrib…
unlink(pkg_dir, recursive = TRUE)