If you're using "Save Actions" to auto-format your Java code, as
recommended in [1], you should add a regex in the settings to make sure
that this only formats Java code. Otherwise you will get weird results
when IntelliJ also formats XML, Markdown or Scala files for you.