Fixing SonarCloud integration + fixing CodeSmells - 2
This commit is contained in:
@@ -10,7 +10,7 @@ namespace BasicDotnetTemplate.MainProject.Controllers
|
||||
protected readonly IConfiguration _configuration;
|
||||
protected readonly AppSettings _appSettings;
|
||||
|
||||
public BaseController(
|
||||
protected BaseController(
|
||||
IConfiguration configuration
|
||||
)
|
||||
{
|
||||
@@ -20,7 +20,7 @@ namespace BasicDotnetTemplate.MainProject.Controllers
|
||||
}
|
||||
|
||||
#nullable enable
|
||||
private BaseResponse CreateResponse(HttpStatusCode status, string message, object? data = null)
|
||||
private static BaseResponse CreateResponse(HttpStatusCode status, string message, object? data = null)
|
||||
{
|
||||
return new BaseResponse()
|
||||
{
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||
<PackageReference Include="NLog" Version="5.2.8" />
|
||||
|
||||
@@ -3,8 +3,9 @@ namespace BasicDotnetTemplate.MainProject.Models.Api.Response;
|
||||
public class BaseResponse
|
||||
{
|
||||
public int Status { get; set; }
|
||||
public string Message { get; set; }
|
||||
#nullable enable
|
||||
public string? Message { get; set; }
|
||||
|
||||
public object? Data { get; set; }
|
||||
#nullable disable
|
||||
}
|
||||
@@ -8,7 +8,7 @@ using System.Reflection;
|
||||
|
||||
namespace BasicDotnetTemplate.MainProject;
|
||||
|
||||
public class ReflectionProgram
|
||||
public static class ReflectionProgram
|
||||
{
|
||||
public static MethodInfo LaunchConfiguration()
|
||||
{
|
||||
@@ -25,7 +25,7 @@ public class ReflectionProgram
|
||||
initialize = m;
|
||||
}
|
||||
}
|
||||
return initialize;
|
||||
return initialize!;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user