From f7589e31400166316591c22604adb3221c4031a1 Mon Sep 17 00:00:00 2001 From: Kamil Zyla Date: Tue, 14 Jun 2022 13:43:17 +0200 Subject: [PATCH] fix: Update lintr config after 3.0.0 release --- .lintr | 11 +++++++---- R/config.R | 10 ++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.lintr b/.lintr index efb8dce1..033031e1 100644 --- a/.lintr +++ b/.lintr @@ -1,6 +1,9 @@ linters: - with_defaults( - line_length_linter = line_length_linter(100), - infix_spaces_linter = NULL, - object_usage_linter = NULL + linters_with_defaults( + line_length_linter = line_length_linter(100) + ) +exclusions: + c( + "inst/rstudio", + "inst/templates" ) diff --git a/R/config.R b/R/config.R index a281eb40..7ac65222 100644 --- a/R/config.R +++ b/R/config.R @@ -14,10 +14,12 @@ read_yaml <- function(path) { } } -option_validator <- function(...) list( - check = function(value) value %in% c(...), - help = cli::format_inline("Allowed values: {c(...)}.") -) +option_validator <- function(...) { + list( + check = function(value) value %in% c(...), + help = cli::format_inline("Allowed values: {c(...)}.") + ) +} positive_integer_validator <- list( check = function(value) is.integer(value) && value > 0,