linters_with_tags {lintr} | R Documentation |
Make a new list based on all linters provided by packages
and tagged with tags
.
The result of this function is meant to be passed to the linters
argument of lint()
,
or to be put in your configuration file.
linters_with_tags(tags, ..., packages = "lintr", exclude_tags = "deprecated")
tags |
Optional character vector of tags to search. Only linters with at least one matching tag will be
returned. If |
... |
Arguments of elements to change. If unnamed, the argument is automatically named.
If the named argument already exists in the list of linters, it is replaced by the new element.
If it does not exist, it is added. If the value is |
packages |
A character vector of packages to search for linters. |
exclude_tags |
Tags to exclude from the results. Linters with at least one matching tag will not be returned.
If |
A modified list of linters.
linters_with_defaults for basing off lintr's set of default linters. available_linters to get a data frame of available linters. linters for a complete list of linters available in lintr.
# `linters_with_defaults()` and `linters_with_tags("default")` are the same:
all.equal(linters_with_defaults(), linters_with_tags("default"))
# Get all linters useful for package development
linters_with_tags(tags = "package_development")
# Get all linters provided by lintr
linters_with_tags(tags = NULL)
# Get all linters tagged as "default" from lintr and mypkg
## Not run: linters_with_tags("default", packages = c("lintr", "mypkg"))