Format code with ktlint checkstyle tool use the following command

mvn process-source -P format

Reference

https://github.com/pinterest/ktlint