|
1 | | -linters: linters_with_tags( |
2 | | - tags = NULL, # include all linters |
| 1 | +linters: all_linters( |
| 2 | + packages = c("lintr", "etdev"), |
| 3 | + pipe_consistency_linter(pipe = "%>%"), |
3 | 4 | object_name_linter = NULL, |
4 | | - undesirable_function_linter = NULL, |
5 | 5 | implicit_integer_linter = NULL, |
6 | | - extraction_operator_linter = NULL, |
7 | 6 | todo_comment_linter = NULL, |
8 | | - function_argument_linter = NULL |
| 7 | + library_call_linter = NULL, |
| 8 | + undesirable_function_linter( |
| 9 | + modify_defaults( |
| 10 | + default_undesirable_functions, |
| 11 | + citEntry = "use the more modern bibentry() function", |
| 12 | + library = NULL # too many false positive in too many files |
| 13 | + ) |
| 14 | + ), |
| 15 | + function_argument_linter = NULL, |
| 16 | + indentation_linter = NULL, # unstable as of lintr 3.1.0 |
9 | 17 | # Use minimum R declared in DESCRIPTION or fall back to current R version. |
10 | 18 | # Install etdev package from https://github.com/epiverse-trace/etdev |
| 19 | + backport_linter(if (length(x <- etdev::extract_min_r_version())) x else getRversion()) |
11 | 20 | ) |
12 | 21 | exclusions: list( |
13 | | - "tests/testthat.R" = list(unused_import_linter = Inf) |
| 22 | + "tests/testthat.R" = list( |
| 23 | + unused_import_linter = Inf |
| 24 | + ), |
| 25 | + "tests" = list( |
| 26 | + undesirable_function_linter = Inf |
| 27 | + ), |
| 28 | + "data-raw" = list( |
| 29 | + missing_package_linter = Inf, |
| 30 | + namespace_linter = Inf |
| 31 | + ), |
| 32 | + # RcppExports.R is auto-generated and will not pass many linters. In |
| 33 | + # particular, it can create very long lines. |
| 34 | + "R/RcppExports.R", |
| 35 | + # R/stanmodels.R is auto-generated and will not pass many linters. In |
| 36 | + # particular, it uses `sapply()`. |
| 37 | + "R/stanmodels.R" |
14 | 38 | ) |
0 commit comments