check_linter | R Documentation |
Provided a list of linters for a given tag, iterate over linters to raise alerts during the documentation process.
check_linter(linters, tag, ...)
## Default S3 method:
check_linter(linters, tag, ...)
## S3 method for class 'list'
check_linter(linters, tag, ...)
## S3 method for class ''function''
check_linter(linters, tag, ...)
## S3 method for class 'character'
check_linter(linters, tag, message = NULL, ...)
linters |
A linters specification, either a |
tag |
A |
... |
Additional arguments unused. |
message |
An optional message to use for an alert. |
TRUE
, invisibly. However, this function is primarily used for its
side-effect of raising alerts during documentation.
check_linter(default)
: By default, no linting is performed
check_linter(list)
: A list
of function
s or character
regular expressions.
If a character
value is named, the name is used as the message for a alert
that is raised when the expression does not match.
check_linter(`function`)
: A function
to evaluate for the given tag
function
's are evaluated with the following arguments:
The roxygen2::roxy_tag()
The contents of the tag's $val
, as named arguments
Because the number of arguments might not be readily apparent, any function
should accept a trailing ...
argument.
Provided function
s may print lint output, or signal lint output with
messages or warnings. A cli::cli_alert()
will reflect the severity of the
function used to emit the output.
check_linter(character)
: A character
regular expressions.
If a character
value is found, its value is assumed to be a regular
expression which must match a given tag's raw
content (the text as it
appears in the roxygen2
header).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.