Skip to end of metadata
Go to start of metadata

By SonarSource – GNU LGPL 3 – Issue TrackerSources – Supported by SonarSource
More versions
SonarC# 7.8 – Oct 30, 2018 – SonarQube 6.7+ (Compatible with LTS)
Few improvements and bug fixes
DownloadRelease notes

Description

SonarC# detects bugs, vulnerabilities and code smells in C# code.

C# 7 syntax is supported since SonarC# 7.5

Steps to Analyze a C# Project

Analyzing a .NET Solution can be done in the Command Line, from Jenkins or from TFS/VSO. Here is a simple and quick example to get started. For more details, please refer to: Analyzing with SonarQube Scanner for MSBuild or consult the sample project on GitHub.

  1. Install SonarQube Server (see Setup and Upgrade for more details)
  2. Install SonarScanner for MSBuild and be sure your can call SonarScanner.MSBuild.exe from the directory where you have your source code
  3. Install SonarC# (see Installing a Plugin for more details). By default SonarC# is provided out of the box with SonarQube.
  4. Run your analysis by executing the following commands from the root directory of the project:

    SonarScanner.MSBuild.exe begin /k:"org.sonarqube:sonar-scanner-msbuild" /n:"Project Name" /v:"1.0"
    MSBuild.exe /t:Rebuild
    SonarScanner.MSBuild.exe end
  5. Follow the link provided at the end of the analysis to browse your project's quality in the SonarQube UI.

Advanced Usage

With SonarC#, you can:

 

  • No labels