Skip to content

Commit

Permalink
linting and updated .lintr to exclude some undesirable function lintrs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlambert committed Mar 28, 2024
1 parent fa2832c commit 18e9dd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .lintr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ linters: all_linters(
modify_defaults(
default_undesirable_functions,
citEntry = "use the more modern bibentry() function",
library = NULL # too many false positive in too many files
library = NULL, # too many false positive in too many files
structure = NULL, # used for class constructor functions
par = NULL # used with on.exit() and {withrs} is not a dependency
)
),
function_argument_linter = NULL,
Expand Down
4 changes: 2 additions & 2 deletions R/extract_param.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ extract_param <- function(type = c("percentiles", "range"),

# Validate inputs
switch(type,
"percentiles" = stopifnot( # nolint
percentiles = stopifnot( # nolint
"'values' and 'percentiles' need to be a vector of length 2" =
type == "percentiles" && length(values) == 2 || length(percentiles) == 2
),
"range" = stopifnot(
range = stopifnot(
"'values need to be a vector of length 3" =
type == "range" && length(values) == 3
)
Expand Down

0 comments on commit 18e9dd8

Please sign in to comment.