Issue with "Integrating SonarQube Cloud with VSTS using TFVC for Xamarin Android Project"
For static code analysis , I am trying to integrate Sonar Cloud with VSTS. I have created the project in Sonar Cloud and added the same using Prepare Analysis step. The build fails at the Run Code Analysis step. Please see below the steps that I have added to automate build for Xamarin Android Code.
1. Use NuGet 4.5.1
2.NUGet Restore
3. Prepare Analysis Step for Sonar Cloud
4. Build Xamarin Android Project
5. VS test assemblies
6.Run Code Analysis ( Build Fails)
7. Signing and aligning the Apk
Though without the Sonar Cloud integration, the build works fine.
I am getting the following error
Error : 2018-05-15T11:48:11.3238514Z INFO: EXECUTION FAILURE 2018-05-15T11:48:11.3238826Z INFO: ------------------------------------------------------------------------ 2018-05-15T11:48:11.3239034Z INFO: Total time: 42.119s 2018-05-15T11:48:11.4108992Z ERROR:
Error during SonarQube Scanner execution 2018-05-15T11:48:11.4109761Z ERROR: Validation of project reactor failed: 2018-05-15T11:48:11.4110149Z o "$/ABC/Sonar-branch" is not a valid branch name. The allowed format is the same as for Git branches. See
https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html 2018-05-15T11:48:11.4110481Z ERROR: 2018-05-15T11:48:11.4110731Z ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging. 2018-05-15T11:48:11.4111028Z INFO: Final Memory: 15M/111M 2018-05-15T11:48:11.4111281Z INFO: ------------------------------------------------------------------------ 2018-05-15T11:48:11.5024850Z The SonarQube Scanner did not complete successfully 2018-05-15T11:48:11.5088067Z 11:48:11.507 Creating a summary markdown file... 2018-05-15T11:48:11.5101821Z 11:48:11.509 Post-processing failed. Exit code: 1 2018-05-15T11:48:11.5302156Z ##[error]D:\a_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.2.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe failed with return code: 1 2018-05-15T11:48:11.5346163Z ##[section]Finishing: Run Code Analysis
Please suggest what needs to be done. I am not able to resolve this.