Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 34 additions & 40 deletions .ci/.lintr.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,45 +71,39 @@ linters = c(dt_linters, all_linters(
))
rm(dt_linters)

# TODO(lintr#2172): Glob with lintr itself.
exclusions = c(local({
exclusion_for_dir <- function(dir, exclusions) {
files = file.path("..", list.files(dir, pattern = "\\.(R|Rmd|Rraw)$", full.names=TRUE))
stats::setNames(rep(list(exclusions), length(files)), files)
}
c(
exclusion_for_dir("tests", list(
quotes_linter = Inf,
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
implicit_integer_linter = Inf,
infix_spaces_linter = Inf,
undesirable_function_linter = Inf
)),
exclusion_for_dir(c("vignettes", "vignettes/fr", "vignettes/ru"), list(
# assignment_linter = Inf,
implicit_integer_linter = Inf,
quotes_linter = Inf,
sample_int_linter = Inf
# strings_as_factors_linter = Inf
# system_time_linter = Inf
)),
exclusion_for_dir("inst/tests", list(
library_call_linter = Inf,
numeric_leading_zero_linter = Inf,
undesirable_operator_linter = Inf, # For ':::', possibly we could be more careful to only exclude ':::'.
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
comparison_negation_linter = Inf,
condition_call_linter = Inf,
duplicate_argument_linter = Inf,
equals_na_linter = Inf,
missing_argument_linter = Inf,
paste_linter = Inf,
rep_len_linter = Inf,
sample_int_linter = Inf,
seq_linter = Inf,
unnecessary_lambda_linter = Inf
))
exclusions = list(
`../tests` = list(
quotes_linter = Inf,
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
implicit_integer_linter = Inf,
infix_spaces_linter = Inf,
undesirable_function_linter = Inf
),
`../vignettes*` = list(
# assignment_linter = Inf,
implicit_integer_linter = Inf,
quotes_linter = Inf,
sample_int_linter = Inf
# strings_as_factors_linter = Inf
# system_time_linter = Inf
),
`../inst/tests` = list(
library_call_linter = Inf,
numeric_leading_zero_linter = Inf,
undesirable_operator_linter = Inf, # For ':::', possibly we could be more careful to only exclude ':::'.
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
comparison_negation_linter = Inf,
condition_call_linter = Inf,
duplicate_argument_linter = Inf,
equals_na_linter = Inf,
missing_argument_linter = Inf,
paste_linter = Inf,
rep_len_linter = Inf,
sample_int_linter = Inf,
seq_linter = Inf,
unnecessary_lambda_linter = Inf
),
`../inst/tests/froll.Rraw` = list(
dt_test_literal_linter = Inf # TODO(michaelchirico): Fix these once #5898, #5692, #5682, #5576, #5575, #5441 are merged.
)
}),
list(`../inst/tests/froll.Rraw` = list(dt_test_literal_linter = Inf)) # TODO(michaelchirico): Fix these once #5898, #5692, #5682, #5576, #5575, #5441 are merged.
)
Loading