Skip to content

Commit 79a2f52

Browse files
committed
Makes it easier to run codenarc from within IntelliJ with clickable links (#351)
1 parent e28db13 commit 79a2f52

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ subprojects {
8282
systemProperties 'TESTS_ARE_OFFLINE': '1'
8383
}
8484
}
85+
86+
tasks.withType(CodeNarc) { codenarcSourceSetTask ->
87+
def reportName = (codenarcSourceSetTask.name - 'codenarc').uncapitalize()
88+
def ideReport = reports.add(org.gradle.api.reporting.internal.TaskGeneratedSingleFileReport, 'ide', reports.task)
89+
ideReport.enabled = true
90+
ideReport.destination = file( "${project.codenarc.reportsDir}/${reportName}.ide.txt")
91+
}
92+
8593
}
8694

8795

0 commit comments

Comments
 (0)