Skip to content

RemoveUnusedImports does not work #2471

@q3769-patientpoint

Description

@q3769-patientpoint

Not sure this is related to #1819 (comment), so opening a new issue here.

The removeUnusedImports is not working, with the setup

            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>2.44.4</version>
                <configuration>
                    <java>
                        <palantirJavaFormat>
                            <version>2.63.0</version>
                            <style>PALANTIR</style>
                            <formatJavadoc>true</formatJavadoc>
                        </palantirJavaFormat>
                        <removeUnusedImports/>
                        <importOrder/>
                        <formatAnnotations/>
                    </java>
                </configuration>
            </plugin>

on Maven 3.9.9 and JDK 21.

There is no error in the console but unused imports are not removed at the end of the run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions