git - Use sonar to prevent a commit if code coverage QG is not met -


i have added sonarqube plugin maven project in conjunction jacoco unit , integration test coverage.

things working , can see on sonar dashboard current rate of code coverage , if miss quality gate code coverage on new builds.

what prevent git commits based on qg result. example workflow:

  1. make changes
  2. git commit
  3. pre-commit git hook fires causes build , sonar check
  4. code coverage not > 80% new code fail , prevent commit

is possible or have commit code , wait until can see detail in dashboard?

something end result seek possible different workflow. take @ github plugin. comments on pull requests. if instead of committing master commit branch , create pull request, plugin scan , comment on code new issues*. human reviewer can decide whether or not merge.

*not rules run in scan. e.g. rules duplications , coverage not included


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -