darwinLintScore.Rd
Function that scores the lintr output as a percentage per message type (style, warning, error). Lintr messages / lines assessed * 100
darwinLintScore(lintFunction, ...)
Lint function to use
Other parameters a Lint function might need (i.e. file name)
A tibble of percentage scores per type of Lint message.
# With darwin file lintr
darwinLintScore(
lintFunction = darwinLintFile,
system.file(package = "DependencyReviewer", "testScript.R")
)
#> ℹ style: 3.06% of lines of code have linting messages
#> ℹ warning: 7.14% of lines of code have linting messages
#> # A tibble: 2 × 2
#> type pct
#> <chr> <dbl>
#> 1 style 3.06
#> 2 warning 7.14
# With standard package lintr
darwinLintScore(
lintFunction = lintr::lint_package,
system.file(package = "DependencyReviewer")
)
#> ℹ 0 Lintr messages found
#> # A tibble: 0 × 2
#> # … with 2 variables: type <chr>, pct <dbl>