Skip to content

Commit 5973479

Browse files
Update cyclocomp_linter.R
1 parent 10945c2 commit 5973479

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

R/cyclocomp_linter.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
#' @seealso [linters] for a complete list of linters available in lintr.
2323
#' @export
2424
cyclocomp_linter <- function(complexity_limit = 15L) {
25-
# nocov start
26-
if (!requireNamespace("cyclocomp", quietly = TRUE)) {
27-
cli::cli_abort("'cyclocomp' package needs to be installed for this linter.")
28-
}
29-
# nocov end
30-
3125
Linter(linter_level = "expression", function(source_expression) {
26+
# nocov start
27+
if (!requireNamespace("cyclocomp", quietly = TRUE)) {
28+
cli::cli_abort("'cyclocomp' package needs to be installed for this linter.")
29+
}
30+
# nocov end
31+
3232
complexity <- try_silently(
3333
cyclocomp::cyclocomp(parse(text = source_expression$content))
3434
)

0 commit comments

Comments
 (0)