From e5e051acd2f83a4c89fff5a658504703d7e46e87 Mon Sep 17 00:00:00 2001 From: Alan Brault Date: Sat, 23 May 2026 14:53:11 -0400 Subject: [PATCH] chore: address sonarlint issues Signed-off-by: Alan Brault --- .editorconfig | 1 + .../Serialization/Json/ApiResponseJsonSerializerContext.cs | 2 +- .../Services/AbstractAuthenticationService.cs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index e8b23c3..9ec8c17 100644 --- a/.editorconfig +++ b/.editorconfig @@ -237,6 +237,7 @@ resharper_convert_to_primary_constructor_highlighting = none # Meziantou Rules dotnet_diagnostic.MA0003.severity = none +dotnet_diagnostic.MA0038.severity = none #### Razor Files #### diff --git a/src/Visus.AddressValidation.Integration.Google/Serialization/Json/ApiResponseJsonSerializerContext.cs b/src/Visus.AddressValidation.Integration.Google/Serialization/Json/ApiResponseJsonSerializerContext.cs index 3b81f13..468b29f 100644 --- a/src/Visus.AddressValidation.Integration.Google/Serialization/Json/ApiResponseJsonSerializerContext.cs +++ b/src/Visus.AddressValidation.Integration.Google/Serialization/Json/ApiResponseJsonSerializerContext.cs @@ -8,4 +8,4 @@ namespace Visus.AddressValidation.Integration.Google.Serialization.Json; [JsonSerializable(typeof(ApiErrorResponse))] [JsonSerializable(typeof(ApiResponse))] [JsonSourceGenerationOptions(WriteIndented = false, PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] -internal partial class ApiResponseJsonSerializerContext : JsonSerializerContext; +internal sealed partial class ApiResponseJsonSerializerContext : JsonSerializerContext; diff --git a/src/Visus.AddressValidation/Services/AbstractAuthenticationService.cs b/src/Visus.AddressValidation/Services/AbstractAuthenticationService.cs index 27b3a9b..a078d50 100644 --- a/src/Visus.AddressValidation/Services/AbstractAuthenticationService.cs +++ b/src/Visus.AddressValidation/Services/AbstractAuthenticationService.cs @@ -99,7 +99,7 @@ public string? CacheKey cancellationToken) .ConfigureAwait(false); - if ( !factoryRan ) + if ( !factoryRan ) // NOSONAR S2583 - false positive: factoryRan is mutated inside the async lambda above { return string.IsNullOrWhiteSpace(tokenResponse?.AccessToken) ? null : tokenResponse.AccessToken; }