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 10945c2 commit 5973479Copy full SHA for 5973479
R/cyclocomp_linter.R
@@ -22,13 +22,13 @@
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) {
+ # nocov start
+ if (!requireNamespace("cyclocomp", quietly = TRUE)) {
+ cli::cli_abort("'cyclocomp' package needs to be installed for this linter.")
+ }
+ # nocov end
+
32
complexity <- try_silently(
33
cyclocomp::cyclocomp(parse(text = source_expression$content))
34
)
0 commit comments