Replacement for SonarC# that leverages OmniSharp to run our Roslyn analyzer
Copyright 2024 SonarSource.
Licensed under the GNU Lesser General Public License, Version 3.0
The project consists of two components:
- a .NET project that produces an assembly that plugs in to OmniSharp
- a Java project that produces a Sonar plugin jar that will be consumed by SonarLint in Rider and VSCode
The Azure pipeline builds, tests and packages both components.
Use the following commands to build locally:
mvn generate-resources -Pdownload-omnisharp-for-building
Set the ARTIFACTORY_USER
(your Sonar email) and ARTIFACTORY_PASSWORD
(your repox credentials) environment variables.
You may need to restart your computer after these variables are set.
dotnet build omnisharp-dotnet/SonarLint.OmniSharp.DotNet.Services.sln
The Java component depends on the .NET component, so the .NET component must be built first.
mvn clean verify