SonarQube provides the capability to show an application's health and highlight newly introduced issues. With a Quality Gate in place, you can Clean As You Code and therefore improve code quality systematically.
Source code and additional information can be found here: https://github.com/SonarSource/sonarqube