Closed cxzl25 closed 3 months ago
This PR aims to enable the removeUnusedImports function in spotless-maven-plugin.
removeUnusedImports
spotless-maven-plugin
Now we can use the following command to automatically remove unused imports.
mvn spotless:apply -Panalyze
We now checkstyle configured <module name="UnusedImports"/>, but it will only check and will not automatically fix the problem.
<module name="UnusedImports"/>
spotless-maven-plugin provides a useful function to automatically remove unused imports, which can provide the efficiency of java developers.
local test
No
please remove the following
done
In addition, can we migrate more rules from checkstyle to spotless?
checkstyle
spotless
This is a good idea, I can continue to try it in the new JIRA.
What changes were proposed in this pull request?
This PR aims to enable the
removeUnusedImports
function inspotless-maven-plugin
.Now we can use the following command to automatically remove unused imports.
Why are the changes needed?
We now checkstyle configured
<module name="UnusedImports"/>
, but it will only check and will not automatically fix the problem.spotless-maven-plugin
provides a useful function to automatically remove unused imports, which can provide the efficiency of java developers.How was this patch tested?
local test
Was this patch authored or co-authored using generative AI tooling?
No