Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

We use Sonar to track code quality. It combines findbugs rules, jacoco (for test coverage) and other code statistics.

The Sonar full analysis is run by our CI daily and results are published at https://ci.openmrs.org/sonar/ In addition each commit triggers an incremental analysis, which is a part of our regular build. You can find results of incremental analysis under artifacts in build results, e.g. https://ci.openmrs.org/browse/TRUNK-MASTER-532 (find the sonar-report link at the bottom of the page). It will tell if you break any of ~500 coding rules and even fail the build if they there are any blockers.

You can search through the list of rules at https://ci.openmrs.org/sonar/rules_configuration/index/3, but in practice you can learn all about them from full or incremental reports.

...

It will run the incremental analysis by default. If you want to run the preview of the full analysis use mvn sonar:sonar -Dsonar.analysis.mode=preview

To see the full report open up a project dashboard in sonar by clicking on the project name https://ci.openmrs.org/sonar/dashboard/index/org.openmrs:openmrs. What you see is the result of the last analysis. You can compare it to the previous analysis by selecting "since previous analysis" from the Time changes... dropdown at the top.

...