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 but it’s still manual.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you commit, tick the
Optimize importsoption on the right. This will become the default until you change it.I prefer using the
Reformat codeoption as well.