Diagnose Documentation Issues
Source:R/diagnostics-documentation.R
diagnose_documentation_issues.RdRuns diagnostics on package documentation to identify common issues that can cause CRAN submission problems or a poor user experience.
Value
List of checktor_check_result() objects plus a passed named logical
vector summarizing pass/fail per check.
Details
This function checks for:
Missing
\valuetags in function documentationExported functions missing an
\examplessectionRoxygen2 usage
Example structure (appropriate use of
\dontrun{})Examples that use Suggested packages without a guard
.Rd files are parsed structurally via tools::parse_Rd() so analyses
look at sections by their Rd_tag rather than grepping LaTeX text.
See also
checktor() for complete package diagnostics
Examples
pkg_path <- example_diagnose_scenario("documentation_examples/missing_value_tag.Rd",
show_content = FALSE)
doc_results <- diagnose_documentation_issues(pkg_path, verbose = FALSE)
summary(doc_results)
#> checks passed failed issues
#> 1 8 7 1 1
issues(doc_results)
#> check file line location message
#> 1 value_tags <NA> NA missing_value_tag.Rd Value tags check