We want to use sonar to verify code formatting. We use Google Java Style Guide http://google.github.io/styleguide/javaguide.html with little modifications and we want to verify our’s code according to it. Maybe you can help us with solution.
You can import the checkstyle xml in sonar if you create a new java quality profile. The import is a bit buggy so you may have to stripdown the checkstyle xml until it works.
Additionally you should run the maven checkstyle plugin during CI build.