Skip to contents

checktor runs extra-CRAN diagnostic checks on R packages, catching common submission issues that R CMD check does not flag. It looks at code patterns, DESCRIPTION fields, documentation, and policy concerns: the kinds of things a reviewer would otherwise catch by hand. It reads your code, .Rd files, and DESCRIPTION the way R does instead of searching text, so it won’t trip over a pattern that only appears in a string or a comment.

For the full list of checks, see the function reference.

Installation

# From CRAN
install.packages("checktor")

# Development version (cutting edge, from GitHub)
# install.packages("pak")
pak::pak("coatless-rpkg/checktor")

Usage

library(checktor)

# Run all diagnostics on the current package
results <- checktor()

# Quiet boolean for CI
if (!checkup()) stop("checktor found issues")

# Treatment recommendations for the issues found
prescribe(results)

# Generate a Markdown / HTML / text report
cat(health_report(results, format = "markdown"), sep = "\n")

# Findings as annotations on the pull request diff in CI
ci_report()

Every check carries a severity tier. By default a clean result means no policy finding, a rule CRAN cites, and no robustness finding, a defect that could crash a user. opinion findings are still reported but do not fail the verdict; pass severity = c("policy", "robustness", "opinion") to count them too.

For end-to-end usage, see the Getting Started vignette. For the rule and tier behind every check, see Where the Checks Come From. To run checktor on every push, see checktor in Continuous Integration. To author new checks against the parsed AST, see the Writing Your Own Checks vignette.

What it does NOT do

checktor complements but does not replace R CMD check or lintr. Run those alongside checktor before submitting to CRAN.