Fails if any setting used in code is missing from the schema. Optionally also
fails if the schema lists properties not referenced in code.
Usage
check_settings_doc_coverage(
schema_path = "configs/settings.schema.json",
search_paths = c("R", "scripts", "tests"),
exclude_dirs = c(".git", "renv", ".venv", "docs", "workbook/_freeze"),
fail_on_unused = FALSE
)
Arguments
- schema_path
Path to JSON schema.
- search_paths
Dirs/files to scan for settings usage.
- exclude_dirs
Dir name fragments to skip.
- fail_on_unused
Also fail if properties are unused in code.
Value
Invisibly returns the diff object; stops on failures.
Examples
if (FALSE) { # \dontrun{
check_settings_doc_coverage()
} # }