-
Notifications
You must be signed in to change notification settings - Fork 2
/
.lintr
40 lines (40 loc) · 1.56 KB
/
.lintr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
linters: all_linters(
packages = c("lintr", "etdev"),
object_name_linter = NULL,
implicit_integer_linter = NULL,
extraction_operator_linter = NULL,
todo_comment_linter = NULL,
undesirable_function_linter(
modify_defaults(
default_undesirable_functions,
citEntry = "use the more modern bibentry() function",
library = NULL # too many false positive in too many files
)
),
indentation_linter = NULL, # unstable as of lintr 3.1.0
# Use minimum R declared in DESCRIPTION or fall back to current R version.
# Install etdev package from https://github.com/epiverse-trace/etdev
backport_linter(if (length(x <- etdev::extract_min_r_version())) x else getRversion()),
commented_code_linter = NULL, # because we want to keep commented code in the template
object_usage_linter = NULL, # because we use Rmd child documents
namespace_linter = NULL, # because we use Rmd child documents
missing_package_linter = NULL # because packages in reports are handled via renv
)
exclusions: list(
"tests/testthat.R" = list(
unused_import_linter = Inf
),
"tests" = list(
undesirable_function_linter = Inf
),
"data-raw" = list(
missing_package_linter = Inf,
namespace_linter = Inf
),
# RcppExports.R is auto-generated and will not pass many linters. In
# particular, it can create very long lines.
"R/RcppExports.R",
# R/stanmodels.R is auto-generated and will not pass many linters. In
# particular, it uses `sapply()`.
"R/stanmodels.R"
)