1

In my current project, whenever a GIT merge of a feature branch is performed to master, a remote Sonar analysis is performed with SonarQube.

I heard from my colleagues that they tried the Sonar plugin for Intellij and it passed their code, however the remote Sonar configuration failed the branch build. This meant creating new GIT branches with Sonar fixes.

Is there any way to configure and run a server-like Sonar check on the local machine before pushing and merging, so that issues are addressed quickly and no new branches are needed?

user998692
  • 5,172
  • 7
  • 40
  • 63
  • what are you missing with the IntelliJ plugin? what problem are you trying to solve? Are you talking about a failing Quality Gate? You can launch analysis on [GitHub pull requests](http://docs.sonarqube.org/display/PLUG/GitHub+Plugin) – Teryk - SonarSource Jan 04 '17 at 08:35
  • The plugin provides different results from the ones from SonarQube, as it seems to use other rules. – user998692 Jan 04 '17 at 16:16
  • I want to be able to fix the violations before merging. As it is, we need to create new branches only for Sonar fixes. – user998692 Jan 04 '17 at 16:16

1 Answers1

1

You can check out git (web) hooks, depending on your overall set up.

Florian Salihovic
  • 3,921
  • 2
  • 19
  • 26