We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46a11d2 commit 10945c2Copy full SHA for 10945c2
R/cyclocomp_linter.R
@@ -22,6 +22,12 @@
22
#' @seealso [linters] for a complete list of linters available in lintr.
23
#' @export
24
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
+
31
Linter(linter_level = "expression", function(source_expression) {
32
complexity <- try_silently(
33
cyclocomp::cyclocomp(parse(text = source_expression$content))
0 commit comments