From c0b171d1ddffcd71ee433a217a0bb5e6188d4f07 Mon Sep 17 00:00:00 2001 From: Joshua Lambert Date: Mon, 26 Feb 2024 12:05:39 +0000 Subject: [PATCH] updated .lintr file --- .lintr | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/.lintr b/.lintr index a7539e4..c5c32d8 100644 --- a/.lintr +++ b/.lintr @@ -1,11 +1,38 @@ -linters: linters_with_tags( - tags = NULL, # include all linters +linters: all_linters( + packages = c("lintr", "etdev"), object_name_linter = NULL, - undesirable_function_linter = NULL, implicit_integer_linter = NULL, extraction_operator_linter = NULL, todo_comment_linter = NULL, + library_call_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 + ) + ), function_argument_linter = NULL, - # Use minimum R declared in DESCRIPTION or fall back to current R version + 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()) ) +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" + )