| check_linter {roxylint} | R Documentation |
Apply 'roxygen2' linters
Description
Provided a list of linters for a given tag, iterate over linters to raise alerts during the documentation process.
Usage
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, ...)
Arguments
linters |
A linters specification, either a |
tag |
|
... |
Additional arguments unused. |
message |
An optional message to use for an alert. |
Value
TRUE, invisibly. However, this function is primarily used for its
side-effect of raising alerts during documentation.
Methods (by class)
-
check_linter(default): By default, no linting is performed -
check_linter(list): Alistoffunctions orcharacterregular expressions.If a
charactervalue is named, the name is used as the message for a alert that is raised when the expression does not match. -
check_linter(`function`): Afunctionto evaluate for the given tagfunction'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
functions may print lint output, or signal lint output with messages or warnings. Acli::cli_alert()will reflect the severity of the function used to emit the output. -
check_linter(character): Acharacterregular expressions.If a
charactervalue is found, its value is assumed to be a regular expression which must match a given tag'srawcontent (the text as it appears in theroxygen2header).