-
Notifications
You must be signed in to change notification settings - Fork 485
Closed
Labels
Description
Today, I received a Dependabot update for Spotless on Mockito: mockito/mockito#2501 The build failed (https://github.com/mockito/mockito/runs/4450375421?check_suite_focus=true) with the following exception:
Execution failed for task ':compileJava'.
> Cannot invoke "Object.hashCode()" because "key" is null
Gradle version: 7.2
Spotless: 6.0.4 (works fine with 6.0.2)
Configuration:
spotless {
// We run the check separately on CI, so don't run this by default
enforceCheck = false
java {
licenseHeaderFile rootProject.file('config/spotless/spotless.header')
custom 'google-java-format', { source ->
com.google.googlejavaformat.java.JavaFormatterOptions options = new com.google.googlejavaformat.java.JavaFormatterOptions.Builder()
.style(com.google.googlejavaformat.java.JavaFormatterOptions.Style.AOSP)
.formatJavadoc(false)
.build()
com.google.googlejavaformat.java.Formatter formatter = new com.google.googlejavaformat.java.Formatter(options)
return formatter.formatSource(source)
}
// This test contains emulation of same-line stubbings. The formatter would put them on a separate line.
targetExclude 'src/test/java/org/mockitousage/internal/junit/UnusedStubbingsFinderTest.java'
}
}