Skip to content

Commit

Permalink
Detekt: Generate reports from execution. (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech committed Feb 15, 2018
1 parent 80d22dc commit f0628da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,11 @@ class CodeQualityToolsPlugin implements Plugin<Project> {
description = 'Runs detekt.'
main = 'io.gitlab.arturbosch.detekt.cli.Main'
classpath = project.configurations.detektCheck
args "--config", rootProject.file(extension.detekt.config), "--input", project.file('.')
args = [
"--config", rootProject.file(extension.detekt.config),
"--input", project.file("."),
"--output", new File(project.buildDir, "reports/detekt/")
]
}

project.check.dependsOn 'detektCheck'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ class CodeQualityToolsPluginDetektTest extends CommonCodeQualityToolsTest {
assert detektCheckTask.group == 'verification'
assert detektCheckTask.description == 'Runs detekt.'
assert detektCheckTask.main == 'io.gitlab.arturbosch.detekt.cli.Main'
assert detektCheckTask.args.size() == 4
assert detektCheckTask.args.size() == 6
assert detektCheckTask.args[0] == '--config'
assert detektCheckTask.args[1] == rootProject.file('code_quality_tools/detekt.yml').toString()
assert detektCheckTask.args[2] == '--input'
assert detektCheckTask.args[3] == project.file('.').toString()
assert detektCheckTask.args[4] == '--output'
assert detektCheckTask.args[5] == new File(project.buildDir, "reports/detekt").toString()
}

@Test void configurations() {
Expand Down

0 comments on commit f0628da

Please sign in to comment.