Skip to content

SonarSource/sonarlint-omnisharp

Repository files navigation

SonarLint Omnisharp Plugin

Replacement for SonarC# that leverage OmniSharp to run our Roslyn analyzer

Build Status Quality Gate Status (dotnet) Quality Gate Status (java)

License

Copyright 2024 SonarSource.

Licensed under the GNU Lesser General Public License, Version 3.0

Overview

The project consists of two components:

  • a .NET project that produces an assembly that plugs in to OmniSharp, and
  • a Java project that produces a Sonar plugin jar that will be consumed in Rider/IntelliJ by SonarLint.

Building locally

The Azure pipeline builds, tests and packages both components.

Use the following commands to build locally:

Download OmniSharp fork mvn generate-resources -Pdownload-omnisharp-for-building

.NET solution: dotnet build omnisharp-dotnet\SonarLint.OmniSharp.DotNet.Services.sln

Java plugin: mvn clean verify

The Java component depends on the .NET component, so the .NET component must be built first.