-
Notifications
You must be signed in to change notification settings - Fork 185
/
Copy path.lintr
53 lines (53 loc) · 1.84 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
41
42
43
44
45
46
47
48
49
50
51
52
53
linters: all_linters(
backport_linter("3.6.0", except = c("R_user_dir", "deparse1", "...names")),
line_length_linter(120L),
object_overwrite_linter(allow_names = c("line", "lines", "pipe", "symbols")),
todo_comment_linter(
except_regex = rex::rex(
"TODO(",
# GitHub issue number #1234, possibly from another repo org/repo#5678
maybe(one_or_more(character_class("a-zA-Z0-9-")), "/", one_or_more(character_class("a-zA-Z0-9._-"))),
"#", one_or_more(digit),
")"
)
),
undesirable_function_name_linter = undesirable_function_linter(modify_defaults(
defaults = default_undesirable_functions,
library = NULL,
options = NULL,
normalizePath = "use normalize_path()"
)),
undesirable_function_call_linter = undesirable_function_linter(
c(
message = "use cli::cli_inform()",
warning = "use cli::cli_warn()",
stop = "use cli::cli_abort()"
),
symbol_is_undesirable = FALSE
),
undesirable_operator_linter(modify_defaults(
defaults = default_undesirable_operators,
`:::` = NULL,
`<<-` = NULL
)),
unnecessary_concatenation_linter(allow_single_expression = FALSE),
absolute_path_linter = NULL,
library_call_linter = NULL,
nonportable_path_linter = NULL,
# We now require R>=4.0.0
strings_as_factors_linter = NULL,
todo_comment_linter = NULL,
# exclude; we use customized version above
undesirable_function_linter = NULL,
# TODO(#2327): Enable this.
unreachable_code_linter = NULL
)
exclusions: list(
"inst/doc/creating_linters.R" = 1L,
"inst/example/bad.R",
"tests/testthat.R" = list(unused_import_linter = Inf),
"tests/testthat/default_linter_testcode.R",
"tests/testthat/dummy_*",
"tests/testthat/exclusions-test",
"tests/testthat/knitr_*"
)