I would like to execute the "reformat code" action on the entire project automatically when I press the run button. Is there any way to do this?
I see two possibilities:
Configure action Run
and Reformat code
to the same keyboard shortcut
Use reformat on save
.
P.S. In any project there must be a VCS. Working with it inside IDEA is really good and you should learn how to use it. There is a native reformat on commit
checkbox in the commit dialog.