mirror of https://github.com/apache/lucene.git
improve spotless error to suggest running 'gradlew tidy' (#817)
The current error isn't helpful as it suggests a per-module command. If the user has modified multiple modules, they will be running gradle commands to try to fix each one of them, when it would be easier to just run 'gradlew tidy' a single time and fix everything.
This commit is contained in:
parent
844bd88839
commit
d6461eab0b
|
@ -111,3 +111,9 @@ configure(project(":lucene").subprojects) { prj ->
|
|||
v.dependsOn ":checkJdkInternalsExportedToGradle"
|
||||
}
|
||||
}
|
||||
|
||||
gradle.taskGraph.afterTask { Task task, TaskState state ->
|
||||
if (task.name == 'spotlessJavaCheck' && state.failure) {
|
||||
throw new GradleException("\n****************************\n*PLEASE RUN ./gradlew tidy!*\n****************************");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue