How to remove unused imports in Intellij IDEA on commit?

前端 未结 9 1636
遥遥无期
遥遥无期 2020-12-23 02:57

Is there a way to remove unused imports in Intellij IDEA on commit?

It is not very optimal to do it manually, CTRL + ALT + O helps b

9条回答
  •  眼角桃花
    2020-12-23 03:24

    File/Settings/Inpsections/Imports and change "Unused import" to Error. This marks them more clearly in the Inspections gutter and the Inspection Results panel.

提交回复
热议问题