-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcheck_documentation.Rd
72 lines (62 loc) · 2.26 KB
/
check_documentation.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check_documentation.R
\name{check_documentation}
\alias{check_documentation}
\title{Check the documentation}
\usage{
check_documentation(x = ".", quiet = FALSE)
}
\arguments{
\item{x}{Either a \code{checklist} object or a path to the source code.
Defaults to \code{.}.}
\item{quiet}{Whether to print check output during checking.}
}
\description{
The function make sure that the documentation is up to date.
Rules:
\itemize{
\item You must use \href{https://roxygen2.r-lib.org}{\code{roxygen2}} to document the
functions.
\item If you use a \code{README.Rmd}, it should be rendered.
You need at least a \code{README.md}.
\item Don't use a \code{NEWS.Rmd} but a \code{NEWS.md}.
\item \code{NEWS.md} must contain an entry for the current package version.
}
}
\details{
The function generates the help files from the \code{roxygen2} tag in the R code.
Then it checks whether any of the help files changed.
We use the same principle with the \code{README.Rmd}.
If any file changed, the documentation does not match the code.
Hence \code{check_documentation()} returns an error.
A side effect of running \code{check_documentation()} locally, is that it
generates all the documentation.
So the only thing left for you to do, is to commit these changes.
Pro tip: make sure RStudio renders the \code{roxygen2} tags whenever you install
and restart the package.
We describe this in \code{vignette("getting_started")} under "Prepare local
setup".
}
\section{Required format for \code{NEWS.md}}{
\if{html}{\out{<div class="sourceCode">}}\preformatted{# package_name version
* Description of something that changed.
* Lines should not exceed 80 characters.
Start a new line with two space to continue an item.
* Add a single blank line before and after each header.
## Second level heading
* You can use second level headings when you want to add more structure.
# `package_name` version
* Adding back ticks around the package name is allowed.
}\if{html}{\out{</div>}}
}
\seealso{
Other package:
\code{\link{check_codemeta}()},
\code{\link{check_cran}()},
\code{\link{check_description}()},
\code{\link{check_environment}()},
\code{\link{check_license}()},
\code{\link{check_package}()},
\code{\link{tidy_desc}()}
}
\concept{package}