Format code with ktlint checkstyle tool use the following command

mvn process-sources -P format

Reference

https://github.com/pinterest/ktlint