Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

adding sonar lint and enabling microsoft code analyzer

Andrew Song09b5b2232810
diff --git a/API/API.csproj b/API/API.csproj
index 52664396f..d9bf4fb47 100644
--- a/API/API.csproj
+++ b/API/API.csproj
@@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
+ <AnalysisMode>Default</AnalysisMode>
<TargetFramework>net5.0</TargetFramework>
+ <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<ItemGroup>
@@ -15,6 +17,10 @@
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
+ <PackageReference Include="SonarAnalyzer.CSharp" Version="8.16.0.25740">
+ <PrivateAssets>all</PrivateAssets>
+ <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+ </PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.8.0" />
</ItemGroup>