Skip to content

Commit ba88540

Browse files
tweak: use native lambda, don't keep source (#2984)
1 parent d6afa52 commit ba88540

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/cyclocomp_linter.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ cyclocomp_linter <- function(complexity_limit = 15L) {
2828
"Cyclocomp complexity is computed using {.fn cyclocomp::cyclocomp}.",
2929
i = "Please install the needed {.pkg cyclocomp} package."
3030
))
31-
return(Linter(function(.) cli_abort("cyclocomp_linter is disabled due to lack of the {.pkg cyclocomp} package")))
31+
return(Linter(\(.) cli_abort("cyclocomp_linter is disabled due to lack of the {.pkg cyclocomp} package")))
3232
}
3333
# nocov end
3434
Linter(linter_level = "expression", function(source_expression) {
3535
complexity <- try_silently(
36-
cyclocomp::cyclocomp(parse(text = source_expression$content))
36+
cyclocomp::cyclocomp(parse(text = source_expression$content, keep.source = FALSE))
3737
)
3838
if (inherits(complexity, "try-error") || complexity <= complexity_limit) {
3939
return(list())

0 commit comments

Comments
 (0)