Repository navigation
[Linting Rule] Rd Files
Generated from 'wiki-linter.ts' on 2026-10-25, 09:29:25 UTC (v2.16.6), do not edit directly.
Rd Files [overview]
This rule ports the following steps of R CMD check (see the conformance table for the legend):
| # | Step | Coverage | Note |
|---|---|---|---|
| 45 | Rd files (book) | 🟩 | \Sexpr macros are not evaluated |
| 46 | Rd metadata (book) | 🟩⭐ | ⭐ also Rd names that differ only by case |
| 47 | Rd cross-references (book) | 🔷 | targets in other packages are asked of the signature database |
| 50 | Rd \usage sections (book) | 🟩 | |
| 51 | Rd contents (book) | 🟩 | |
| 52 | Rd line widths (book) | 🟩 | |
| 53 | examples (book) | 🔷⭐ | ⭐ also T and F in the examples parses the examples and checks what they call, without running them |
| 54 | PDF version of manual (book) | 🔷 | the Rd constructs that break the LaTeX rendering |
| 55 | PDF version of manual without index (book) | 🔷 | the Rd constructs that break the LaTeX rendering |
| 88 | examples with --run-donttest (book) | 🔷⭐ | ⭐ also T and F in the examples the \donttest code is checked like all examples |
| 89 | for non-standard things in the check directory (book) | 🔷 | files tests, vignettes, and examples write into the working directory |
| 90 | for detritus in the temp directory (book) | 🔶 | only the files written by name |
| 91 | for new files in some other directories (book) | 🔶 | only the files written by name |
| 92 | HTML version of manual (book) | 🔷 | the Rd files that would not render |
This rule is a best-effort rule.
Finds problems in the Rd files: syntax, unknown macros, required and duplicated sections, metadata, cross-references, line widths, contents, and the example code.
This linting rule is implemented in src/linter/rules/cmd-check/rd-files.ts.
Linting rules can be configured by passing a configuration object to the linter query as shown in the example below.
The rd-files rule accepts the following configuration options:
-
bibentries
report bibentries a page cites but does not show
R CMD check #45 -
contents
report missing descriptions and values, argument items without text, and generated boilerplate
R CMD check #51 -
crossReferences
report links to topics no page or package provides
R CMD check #47 -
docStyle
report S3 methods a\usagecalls by their full name instead of with\method
R CMD check #50 -
examples
parse the examples and report their syntax errors, undefined calls,TandF,q(), and the files they write
R CMD check #53, #88 -
examplesWidth
the widest line an\examplessection may have
R CMD check #52 -
extraMacros
Rd macro files to load besides those of the package
R CMD check #45 -
keywords
the keywords besides the standard ones a page may use
R CMD check #45 -
lineWidths
report lines in\usageand\exampleswider thanRdFilesConfig#usageWidthandRdFilesConfig#examplesWidth
R CMD check #52 -
metadata
report duplicate names and aliases, names that differ only by case, and pages without any alias
R CMD check #46 -
minLevel
drop parser diagnostics below thischeckRdlevel, the messages ofprepare_Rdare always kept
R CMD check #45 -
parse
report what the Rd parser of R reports: syntax errors, unknown macros, and unexpected sections
R CMD check #45 -
requireValue
report functions documented without a\valuesection
R CMD check #51 -
standardKeywords
report keywords that are neither standard nor inRdFilesConfig#keywords
R CMD check #45 -
uncertainLinks
also report links whose target flowR cannot decide
R CMD check #47 -
usageWidth
the widest line a\usagesection may have
R CMD check #52
A project with the code R/code.R:
f <- function(x) xand the files
DESCRIPTION:
Package: pkg
Version: 1.0
Title: A Package
License: MIT
man/f.Rd:
\name{f}
\alias{f}
\title{F}
\description{D}
\details{
a \foo{x}}
The linting query can be used to run this rule on the above example:
[ { "type": "linter", "rules": [ { "name": "rd-files", "config": {} } ] } ]Results (prettified and summarized):
Query: linter (6 ms)
╰ Rd Files (rd-files):
╰ certain:
╰ rd-unknown-macro in man/f.Rd at /pkg/man/f.Rd:6.1
More examples are the test cases in test/functionality/linter/cmd-check/lint-rd-files.test.ts.
Currently maintained by Florian Sihler and Oliver Gerstl at Ulm University
Email | GitHub | Penguins | Portfolio
- 🧑💻 Developer Onboarding
- 💻 Setup
- 👓 Overview
- 🪟 Interfacing with flowR
- 🌋 Core
- 🧹 Testing & Linting (Benchmark Page)
⁉️ FAQ- ℹ️ Extra Information