diff --git a/R/lint.R b/R/lint.R index 6c0f0d349..222982cb0 100644 --- a/R/lint.R +++ b/R/lint.R @@ -616,9 +616,10 @@ sarif_output <- function(lints, filename = "lintr_results.sarif") { rule_index_exists <- 0L } else { rule_index_exists <- - which(sapply( + which(vapply( sarif$runs[[1L]]$tool$driver$rules, - function(x) x$id == lint$linter + function(x) x$id == lint$linter, + logical(1L) )) if (length(rule_index_exists) == 0L || is.na(rule_index_exists[1L])) { rule_index_exists <- 0L diff --git a/R/with.R b/R/with.R index e2cb05f6e..a423e68ac 100644 --- a/R/with.R +++ b/R/with.R @@ -110,7 +110,7 @@ linters_with_tags <- function(tags, ..., packages = "lintr", exclude_tags = "dep ) } linter_factories <- mget(available$linter, envir = pkg_ns) - linters <- mapply( + linters <- Map( call_linter_factory, linter_factory = linter_factories, linter_name = names(linter_factories),