Skip to content

Commit 53c439b

Browse files
committed
Copy .lintr from packagetemplate
1 parent 009240f commit 53c439b

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

.lintr

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,38 @@
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 = "%>%"),
34
object_name_linter = NULL,
4-
undesirable_function_linter = NULL,
55
implicit_integer_linter = NULL,
6-
extraction_operator_linter = NULL,
76
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
917
# Use minimum R declared in DESCRIPTION or fall back to current R version.
1018
# Install etdev package from https://github.com/epiverse-trace/etdev
19+
backport_linter(if (length(x <- etdev::extract_min_r_version())) x else getRversion())
1120
)
1221
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"
1438
)

0 commit comments

Comments
 (0)