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?
You can check out git (web) hooks, depending on your overall set up.