Provided a list of linters for a given tag, iterate over linters to raise alerts during the documentation process.
check_linter(linters, tag, ...)# S3 method for default
check_linter(linters, tag, ...)
# S3 method for list
check_linter(linters, tag, ...)
# S3 method for `function`
check_linter(linters, tag, ...)
# S3 method for character
check_linter(linters, tag, message = NULL, ...)
TRUE
, invisibly. However, this function is primarily used for its
side-effect of raising alerts during documentation.
A linters specification, either a function
or
character
regular expression that should be matched, or a list
of either. See details for more information.
Additional arguments unused.
An optional message to use for an alert.
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 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).