Skip to content

Commit 57e5a22

Browse files
committed
Disable Configuration Cache in generated pre-commit Gradle call
internalKtlintGitFilter is part of the cache key, and it changes with every commit, so getting a cache hit is extremely unlikely.
1 parent c4d1d9c commit 57e5a22

File tree

1 file changed

+1
-1
lines changed
  • plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint

1 file changed

+1
-1
lines changed

plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/GitHook.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private fun generateGradleCommand(
3636
} else {
3737
"./gradlew"
3838
}
39-
return "$gradleCommand --quiet $taskName -P$FILTER_INCLUDE_PROPERTY_NAME=\"${'$'}CHANGED_FILES\""
39+
return "$gradleCommand --quiet --no-configuration-cache $taskName -P$FILTER_INCLUDE_PROPERTY_NAME=\"${'$'}CHANGED_FILES\""
4040
}
4141

4242
private fun generateGitCommand(

0 commit comments

Comments
 (0)