diffplug / diffplug/spotless

removeUnusedImports does nothing

Abierto
#2,582 4 comentarios 5 reacciones 0 asignados Ver en GitHub
bug-unconfirmed
Lenguaje dominante
Java
Estrellas
5.6k
Forks
559
Merge medio
1 d 14 h
PR fusionados (30 d)
43

Descripción

I have a [demo project](https://github.com/spartanhooah/smartbar-backoffice) that I've recently started. I generated some stubs from the OpenAPI spec using the Gradle plugin for that, and the code had some unused imports. I have configured Spotless to remove unused imports [here](https://github.com/spartanhooah/smartbar-backoffice/blob/master/build.gradle.kts#L48), but it's not happening. I don't see any errors when I run `spotlessApply`, and if I add the `--info` flag I don't see any mention of import in the output.

Project details:
Gradle wrapper 8.14
Spotless plugin version 7.2.1
Default version of `palantirJavaFormat`

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start with the linked demo project's build.gradle.kts configuration and reproduce the behavior using the Gradle wrapper, Spotless 7.2.1, and the default palantirJavaFormat. Compare spotlessApply results and --info output against the configured removeUnusedImports step. Done means the unused imports in the generated OpenAPI stubs are removed without errors.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
build-system, tooling
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
55/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.