SonarQube analysis - sonarqube-scan

In sonar qube analysis I have projects of different versions on which independent development is done.
But if I analyze these projects each analysis is shown in the same project in sonar.
I want to differentiate each version,
Is there a provision for such requirement.

I tried the -Dsonar.projectkey in the maven argument to analyze sonar but it does not work, at least on versions of sonar above 5.6.6 Lts since I tried this on 5.6.6 and 6.3,
An alternative though which I found was -Dsonar.branch.
The argument would look like -Dsonar.branch=.
This works fine.

Related

Chrome Version mismatch while running Azure Pipeline

I have added a Selenium Project into the Azure pipeline as a maven task. But while running the same pipeline I am getting an error messaged 'Chrome version and chromedriver version is mismatching'.
What should I do to overcome this ?? How to know the chrome version installed inside the windows instance (Each time it takes different windows instance)
How does Microsoft choose the software and versions to put on the image?
More information about the versions of software included on the images
can be found at Guidelines for what's installed.
In your scenario, since you need a specific chrome version. The best and recommend way is using self-host agent.
You can use a self-hosted agent that includes the exact versions of software that you need. For more information, see Self-hosted agents. In this way, you could even clone an environment on VM as same as your local development, this will help to narrow down build issue which caused by environment.

Running unit tests on Mac with MvvmCross?

Finally, I've got my Mac and tried to re-compile and run my project with Xamarin.iOs
Since, PCL is not yet supported, I had to create a copies of .sln and .csproj and replace references to MvvmCross-Binaries and it works (thanks, Stuart). I hope Xamarin will give more elegant solution soon.
However, I couldn't compile and run unit tests on Mac - Mono 4.5 is not installed, and I didn't find Cirrious.MvvmCross.Test.Core.dll.
So, is it possible to run this kind of unit tests on Mac or we just test it in Windows platform?
I believe you should be able to build and run the 4.5 assemblies using the latest mono 3 releases. Further, the latest mono alpha release should also contain 'proper' support for portable class libraries.
Alternatively, if you'd rather work off of stable xam releases, then you'll probably need to create your own version of a .net4 core test assembly - there are only 2 small classes so this shouldn't be too hard to do - https://github.com/slodge/MvvmCross/tree/v3/Cirrious/Test/Cirrious.MvvmCross.Test.Core
As well as on mac testing, I know some people also use the on device test runners - especially for iOS where the aot compilation makes on-device testing important.

How can we use VS2012 Static Analysis Rules with FxCop 10 Standalone

We're struggling to get some rules that work fine in the VS2012 code analysis tool, to appear in FxCop 10.
Specifically we're trying to get CA2100 - "Review sql queries for security vulnerabilities"
We've tried adding the DLLs from VS2012 (11) but it doesn't seem to work.
Our goal is to ultimately run the VS2012 ruleset as part of a TeamCity build, so we'll probably end up with the cmd line version, but our build agents do not have vs installed and hence we need to use the standalone version.
Any help much appreciated
dan
The VS 2012 rule assemblies are compiled against a different version of the FxCop core assemblies than FxCop 10 (which is the same as that used for VS 2010), so no. However, if your goal is to run this as part of an automated build, the version of fxcopcmd.exe (plus its dependencies) found in your VS 2012 installation should work fine on your build server. Licensing considerations may, however, apply.

Do I need to install AzureSdk on the build server to create azure packages?

We use TeamCity as our CI server (but I imagine this applies to any build server).
We have not installed the azure SDK on the build server and are able to build the projects which use the SDK using the workaround described here.
I now want the server to produce the packages for deployment to Azure, but when I run an MSBuild task to create the packages (as directed here) I get a strange error
error MSB4057: The target "WatGetTargetFrameworkDirectories" does not exist in the project.
which yields few useful google results.
Do I need to install the SDK? Or is this error related to something else?
WatGetTargetFrameworkDirectories is a target from AzureSDKs .targets file. Looks like your error related to Azure SDK.
Except it could be more subtle error related to not very good msbuild Azure Targets. For our own azure packaging we did need to call 2 targets "Clean;CorePublish", not just "Publish". Maybe this will also help you.
Side note: why you don't want to install AzureSDK on TeamCity BuildAgent? Build agents made exactly for that - to have frameworks you need for build. Also 1.6 and 1.7 AzureSDKs can be installed side-by-side.

sonar for .net 4 in ccnet

hi all
does sonar support .net 4?
if so how can i integrate sonar with cruisecontrol.net (ccnet) with out using maven o anything else.just sonar and ccnet..
thanx
Take a look at the wiki page mentioned before and if you encounter any trouble, feel free to register to the user mailing list and ask for help (see http://www.sonarsource.org/support/support/).
For now, even if sonar 2.6 may use ant or a simple command line to trigger the analysis on a java project, maven is mandatory for a .net project. This will change pretty soon. I am working with the guys from sonarsource to give birth to a new "C# plugin"... First version probably at the beginning of this summer.
For now, only solution I see to integrate sonar with ccnet is to launch a maven command line from ccnet.
I documented my experience setting up Sonar with my C# projects. I used TeamCity instead of CCNet, but that's a small portion of the overall setup, so should be straightforward to configure. http://www.wrightfully.com/setting-up-sonar-analysis-for-c-projects/

Resources