Ólavur Joensen
06/04/2019, 2:14 PMdetekt {
toolVersion = "1.0.0-RC14"
input = files("src/main/kotlin")
filters = ".*/resources/.*,.*/build/.*"
}
I get loads of errors in the console, all with the following message: Analyzing '[filename redacted]' led to an exception.
The original exception message was: java.lang.NoClassDefFoundError: io/gitlab/arturbosch/detekt/rules/LinesOfCodeKt$tokenSequence$1
Running detekt '1.0.0-RC14' on Java '1.8.0_151-b12' on OS 'Mac OS X'.
(am running Gradle 5.4.1)
What I’ve tried
- Building and running Detekt via the CLI - this works fine, and gives me a report (I ran it on the same project that fails via the Gradle).
- Switching to version 1.0.0-RC13 via Gradle yields the same errors as with RC14
- Clearing out the gradle caches and gradle clean
does not seem to have any effect
- (edit) Running the gradle task inside a Docker container using gradle@latest
image doesn’t help
Ideally, I want it to be run via Gradle - does anyone have any pointers as to what may the cause of this issue, or perhaps how I can fix it?Mike
06/04/2019, 2:33 PMÓlavur Joensen
06/04/2019, 3:43 PMid "io.gitlab.arturbosch.detekt" version "1.0.0-RC14"
gradle detekt
inside a Docker container using the gradle@latest
image - that oddly gave me the same series of NoClassDefFoundError
schalkms
06/04/2019, 9:04 PMLinesOfCode
is no rule. That's interesting.Ólavur Joensen
06/05/2019, 7:31 AMLinesOfCode
is not a rule, but it does exist: https://github.com/arturbosch/detekt/blob/master/detekt-rules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/LinesOfCode.kt
The odd thing is that if I dig into the detekt-rules JAR in the Gradle cache, the class seems to be there.schalkms
06/05/2019, 6:10 PMÓlavur Joensen
06/06/2019, 1:44 PMschalkms
06/07/2019, 2:42 PMArtur Bosch
06/08/2019, 8:03 AMsequence
buildersÓlavur Joensen
06/14/2019, 2:13 PMschalkms
06/14/2019, 5:06 PMÓlavur Joensen
06/14/2019, 5:11 PMschalkms
06/14/2019, 7:52 PMÓlavur Joensen
08/12/2019, 8:47 AMschalkms
08/12/2019, 7:14 PM