diffplug / diffplug/spotless

removeUnusedImports does nothing

Open
#2,582 4 comments 5 reactions 0 assignees View on GitHub
bug-unconfirmed
Dominant language
Java
Stars
5.6k
Forks
559
Avg merge
1d 13h
Merged PRs (30d)
34

Description

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`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.