Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sonar-scm-tfvc cannot be used for gated check-ins #34

Open
gsf-at-eon opened this issue Apr 4, 2017 · 0 comments
Open

sonar-scm-tfvc cannot be used for gated check-ins #34

gsf-at-eon opened this issue Apr 4, 2017 · 0 comments

Comments

@gsf-at-eon
Copy link

I think the behaviour of sonar-scm-tfvc is incorrect when used with gated check-ins. A TFVC gated check-in creates a shelveset of the changes that are 'gated' and uses the success of the build to determine whether the shelveset is then merged to the relevant branch. However, SonarTfsAnnotate reports that the code in the shelveset has not been check-in and refuses to analyse the code. Here is the output in the MSBuild.SonarQube.Runner's end process:-

08:55:30.826 INFO - SCM provider for this project is: tfvc
08:55:30.842 INFO - 1 files to be analyzed
08:55:34.507 ERROR - Unable to TFS annotate the following file which line 43 has not yet been checked-in (LOCAL): D:/Builds/5/MyBuild/DeleteThisRedundantClass.cs
08:55:34.522 INFO - 0/1 files analyzed

Without this analysis SonarQube's "Coverage on new Code" value is null. Any SonarQube Quality Gate that is dependent on "Coverage on new Code" will be ignored because it is null. The result is that it is not possible to use sonar-scm-tfvc with a gated check-in that enforces that code coverage on new code meets the company's standard.

I would like SonarTfsAnnotate to recognise that the code that it needs to analyse is in the shelveset not the TFVC branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants