Comparing dev against master branch without GIT or PRs

So we have the following setup: We use a master branch and have a dev branch before that, where everybody integrates their featurebranches. Therefore we want to have a quality gate when checkin into the dev branch. As we use TFS and a gated checkin. the source code is not checked in, if we have a red quality gate as we use a build breaker step for red gates. The Problem is, that the “Last Code Period” is always the last checkin. So if I make the quality gate red I only have to checkin again and then the gate is green, because there is no change at all. The same goes, if I just change one tested line and I am fine. This is obviously pretty useless, so we got ourselves the Enterprise Edition as we thought, we could make the Master our baseline, but so far I was not able to do that. The Dev build has the and the master has none, so the master is master and dev is dev. But the problem still is the same, as dev analysis just checks if the old dev checkin was ok. This obviously is also not very helpful, for the mentioned reasons.

As we have some 200 solutions and none of them is on GIT migrating to PRs is not feasible, like mentioned in other threads arround here.

Is there any solution to this?

I already asked something similar here How to set the new code period to the last green quality gate


Welcome to the community & sorry your earlier post got overlooked.

In fact, this is just a question of your New Code Period setting. Either you’ve got it set to previous_analysis (assuming that setting still works) or you’ve got it set to previous_version and you’re passing in a new/unique version string (sonar.projectVersion) for each analysis. Sort that out and your QG status becomes useful.


Hi Ann,

thanks for the reply, we have it set to previous analysis and the version is always our build number. I guess this is the problem. I will try out a few ideas and see if this works as intended.

Thanks for the help so far!