I prepared Sonar for analizing my C# project. I installed sonar and sonar-runner and also configured the C# plugins (.NET Core, C# Core, FxCop, Gendarme, Gallio, OpenCover and StyleCop)
So far everythings works fine. In Sonar I see my code statistics (LOCs and so on) and I also see the code violations. There is no code coverage buts thats ok because I do not have any tests.
The problem is that I only see violations regarding Stylecop, so it just shows some code style problems. But I am sure that my application also must have other violations that should be detected by FxCop and the other plugins.
In this picture one can just see that it shows a violation from StyleCop. All my violations are ONLY from StyleCop.
In the Sonar C# Documentation I have read that it can happen that Analysis succeeds but too few violations were found, maybe because of the wrong assambly direction. I show you my sonar-runner.properties, maybe here is the cause of my problems:
#----- Default Sonar server
#sonar.host.url=http://localhost:9000
#----- PostgreSQL
#sonar.jdbc.url=jdbc:postgresql://localhost/sonar
#sonar.jdbc.driver=org.postgresql.Driver
#----- MySQL
#sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
#sonar.jdbc.driver=com.mysql.jdbc.Driver
#----- Oracle
#sonar.jdbc.url=jdbc:oracle:thin:@localhost/XE
#sonar.jdbc.driver=oracle.jdbc.driver.OracleDriver
#----- Global database settings
#sonar.jdbc.username=sonar
#sonar.jdbc.password=sonar
#----- Default directory layout
sonar.sources=src
sonar.tests=src
sonar.binaries=src
#----- Default source code encoding
#sonar.sourceEncoding=UTF-8
I also want to list my application structure:
-->ProjectMainFolder
-->Project.sln
-->sonar-project.properties
-->Project1Folder
-->bin
-->object
-->Properties
-->Project1.csproj
-->Project1Main.cs
-->Project2Folder
-->bin
-->object
-->Properties
-->Project2.csproj
-->Project2Main.cs
So the question again: Why do I only see StyleCop violations and no violation from FxCop, Gendarme and so on?
I also want to add my sonar-project.properties:
# optional description
sonar.projectDescription=Project description
# Project identification
sonar.projectKey=Vendor:Project
sonar.projectVersion= 1.0
sonar.projectName= Project
# Info required for Sonar
sources=.
sonar.language=cs
sonar.sourceEncoding=UTF-8
#Core C# Settings
sonar.dotnet.visualstudio.solution.file=Project.sln