View source: R/cyclocomp_linter.R
cyclocomp_linter | R Documentation |
Check for overly complicated expressions. See cyclocomp()
function from {cyclocomp}
.
cyclocomp_linter(complexity_limit = 15L)
complexity_limit |
Maximum cyclomatic complexity, default |
best_practices, configurable, readability, style
linters for a complete list of linters available in lintr.
# will produce lints
lint(
text = "if (TRUE) 1 else 2",
linters = cyclocomp_linter(complexity_limit = 1L)
)
# okay
lint(
text = "if (TRUE) 1 else 2",
linters = cyclocomp_linter(complexity_limit = 2L)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.