GradleException when multiple goals leave behind spotless-clean dir
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Stack tecnológico
- java
- Área
- build-system, tooling
Línea de trabajo
Empieza reproduciendo la secuencia en el proyecto openapi-generator-client enlazado: gradle clean openApiGenerate spotlessApply, seguida de gradle spotlessCheck o gradle build. Inspecciona el directorio generado build/spotless-clean/spotlessJava/build/generate-resources/main/src/main/java/ y compara el comportamiento con una ejecución separada de spotlessApply o con un objetivo explícito; se considera terminado cuando la comprobación o la compilación posterior se completa correctamente sin limpieza manual.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
In my project: https://github.com/sixcorners/openapi-generator-client/tree/7b2dfb9cda3fe366f0a45f76b60b1a1961311d65
If you run
gradle clean openApiGenerate spotlessApply
it leaves behind a build/spotless-clean/spotlessJava/build/generate-resources/main/src/main/java/ directory. If you then run gradle spotlessCheck or gradle build it throws an error:
Caused by: org.gradle.api.GradleException: There were 0 lint error(s), they must be fixed or suppressed.
Resolve these lints or suppress with `suppressLintsFor`
at com.diffplug.gradle.spotless.SpotlessCheck.performAction(SpotlessCheck.java:85)
at com.diffplug.gradle.spotless.SpotlessCheck.performAction(SpotlessCheck.java:57)
if you delete build/spotless-clean or just run gradle spotlessApply again then gradle build works again.
kind of annoying but it's not a big deal.
specifying the target manually also fixes it.
spotless {
java {
googleJavaFormat()
target("src/main/java", "build/generate-resources/main/src/main/java")
}
kotlinGradle { ktfmt() }
}
I kind of thought the bug was something else but that disappeared so I kind of wonder if this can even be reproduced on other people's machines or if it will disappear too. It's also not a big deal since you can just run gradle spotlessApply in it's own cli invocation. Also running the build gradle goal in IntelliJ doesn't reproduce the issue. It's very fiddly. If you have trouble reproducing it I wouldn't mind if you just close this issue and leave it as a place for other people to find if they have something similar happen.
This is my gradle version running in a snap:
$ gradle --version
------------------------------------------------------------
Gradle 9.6.1
------------------------------------------------------------
Build time: 2026-06-26 14:25:50 UTC
Revision: 309d128bd9fe8c0b71311878fc660b9cbaa07c51
Kotlin: 2.3.21
Groovy: 4.0.32
Ant: Apache Ant(TM) version 1.10.17 compiled on April 6 2026
Launcher JVM: 25.0.3 (Ubuntu 25.0.3+9-2-26.04.2-Ubuntu)
Daemon JVM: /usr/lib/jvm/java-25-openjdk-amd64 (no Daemon JVM specified, using current Java home)
OS: Linux 7.0.0-27-generic amd64
- Lenguaje dominante
- Java
- Estrellas
- 5.7k
- Forks
- 563
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 53
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de diffplug/spotless
-
google-java-format 1.37.0: NoSuchMethodError on JavaFormatterOptions$Style.valueOf (Style is now a record)Posiblemente ocupada @Goooler la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
diffplug/spotless#3126 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
diffplug/spotless#3125 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Add support for org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_record_parameterAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
Maven plugin: Maven 4 warns about Plexus `@Component` injectionPosiblemente ocupada @Goooler la tomó hace 4 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
diffplug/spotless#3121 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
Todos los issues de diffplug/spotless
Issues similares
-
new feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
[C#]:主页联网更新的提示投稿横幅指向错误Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
PCL-Community/PCL-CE#3652 ·
Los mantenedores suelen responder en 1 día
-
TaskSecret.vue: replace explicit `any` with real typesPosiblemente ocupada @prayas-bit la tomó hoy. Abiertoarea/frontend good first issue kind/cooldown
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
kestra-io/kestra#20352 · 1 comentario ·
Los mantenedores suelen responder en 1 día