Resolve some warnings

This commit is contained in:
Archi 2023-11-27 13:01:52 +01:00
parent 306fbef3c2
commit a59087b574
No known key found for this signature in database
GPG key ID: 6B138B4C64555AEA
3 changed files with 4 additions and 4 deletions

View file

@ -114,6 +114,7 @@ dotnet_code_quality_unused_parameters = all:warning
dotnet_diagnostic.ca1028.severity = silent
dotnet_diagnostic.ca1031.severity = silent
dotnet_diagnostic.ca1863.severity = silent
# Rule - almost everything
dotnet_naming_rule.almost_everything_must_be_pascal_case.severity = warning

View file

@ -21,6 +21,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
using System.Net;
@ -41,6 +42,7 @@ public sealed class TypeController : ArchiController {
/// <remarks>
/// Type info is defined as a representation of given object with its fields and properties being assigned to a string value that defines their type.
/// </remarks>
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields)]
[HttpGet("{type:required}")]
[ProducesResponseType<GenericResponse<TypeResponse>>((int) HttpStatusCode.OK)]
[ProducesResponseType<GenericResponse>((int) HttpStatusCode.BadRequest)]

View file

@ -50,10 +50,7 @@
<DebugType>none</DebugType>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<WarningsNotAsErrors>CS8002,IL2026,IL2057,IL2072,IL2075,IL2104,IL3000</WarningsNotAsErrors>
<!-- TODO: .NET 8 -->
<WarningsNotAsErrors>$(WarningsNotAsErrors),CA1863</WarningsNotAsErrors>
<WarningsNotAsErrors>CA1863,CS8002,IL2026,IL2057,IL2072,IL2075,IL2104,IL3000</WarningsNotAsErrors>
</PropertyGroup>
<!-- Enable public signing if not part of Visual Studio, which is too stupid to understand what public signing is -->