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:
- make changes
- git commit
- pre-commit git hook fires causes build , sonar check
- 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
Post a Comment