Skip to contents

available_linters() obtains a tagged list of all Linters available in a package.

available_tags() searches for available tags.


available_linters(packages = "lintr", tags = NULL, exclude_tags = "deprecated")

available_tags(packages = "lintr")



A character vector of packages to search for linters.


Optional character vector of tags to search. Only linters with at least one matching tag will be returned. If tags is NULL, all linters will be returned.


Tags to exclude from the results. Linters with at least one matching tag will not be returned. If except_tags is NULL, no linters will be excluded.


available_linters returns a data frame with columns 'linter', 'package' and 'tags':


A character column naming the function associated with the linter.


A character column containing the name of the package providing the linter.


A list column containing tags associated with the linter.

available_tags returns a character vector of linter tags used by the packages.

Package Authors

To implement available_linters() for your package, include a file inst/lintr/linters.csv in your package. The CSV file must contain the columns 'linter' and 'tags', and be UTF-8 encoded. Additional columns will be silently ignored if present and the columns are identified by name. Each row describes a linter by

  1. its function name (e.g. "assignment_linter") in the column 'linter'.

  2. space-separated tags associated with the linter (e.g. "style consistency default") in the column 'tags'.

Tags should be snake_case.

See available_tags("lintr") to find out what tags are already used by lintr.

See also

linters for a complete list of linters available in lintr.


lintr_linters <- available_linters()

# If the package doesn't exist or isn't installed, an empty data frame will be returned
#> [1] linter  package tags   
#> <0 rows> (or 0-length row.names)

lintr_linters2 <- available_linters(c("lintr", "does-not-exist"))
identical(lintr_linters, lintr_linters2)
#> [1] TRUE
#>  [1] "best_practices"      "common_mistakes"     "configurable"       
#>  [4] "consistency"         "correctness"         "default"            
#>  [7] "deprecated"          "efficiency"          "executing"          
#> [10] "package_development" "readability"         "robustness"         
#> [13] "style"