With the sourcehawk-maven-plugin you can perform static code analysis on your repository source. See the Sourcehawk Docs for information on configuration.
sourcehawk:scan goalAccepting all the defaults, this will run in the validate phase.
mvn sourcehawk:scan