diff --git a/BTCPayServer.Common/Logging/ConsoleLogger.cs b/BTCPayServer.Common/Logging/ConsoleLogger.cs index def1a79f4..ece125968 100644 --- a/BTCPayServer.Common/Logging/ConsoleLogger.cs +++ b/BTCPayServer.Common/Logging/ConsoleLogger.cs @@ -180,7 +180,7 @@ namespace BTCPayServer.Logging logBuilder.Append(": "); var lenAfter = logBuilder.ToString().Length; while (lenAfter++ < 18) - logBuilder.Append(" "); + logBuilder.Append(' '); // scope information GetScopeInformation(logBuilder); diff --git a/BTCPayServer.Rating/Providers/KrakenExchangeRateProvider.cs b/BTCPayServer.Rating/Providers/KrakenExchangeRateProvider.cs index 3ca425eae..d4be22beb 100644 --- a/BTCPayServer.Rating/Providers/KrakenExchangeRateProvider.cs +++ b/BTCPayServer.Rating/Providers/KrakenExchangeRateProvider.cs @@ -168,7 +168,7 @@ namespace BTCPayServer.Services.Rates sb.Append(url); if (payload != null) { - sb.Append("?"); + sb.Append('?'); sb.Append(String.Join('&', payload.Select(kv => $"{kv.Key}={kv.Value}").OfType().ToArray())); } var request = new HttpRequestMessage(HttpMethod.Get, sb.ToString()); diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj index d4b07b3a4..f3bd39239 100644 --- a/BTCPayServer/BTCPayServer.csproj +++ b/BTCPayServer/BTCPayServer.csproj @@ -54,11 +54,6 @@ - - - all - runtime; build; native; contentfiles; analyzers - @@ -70,10 +65,6 @@ - - all - runtime; build; native; contentfiles; analyzers - diff --git a/BTCPayServer/Filters/ContentSecurityPolicyAttribute.cs b/BTCPayServer/Filters/ContentSecurityPolicyAttribute.cs index 7f303ca5d..b2973b003 100644 --- a/BTCPayServer/Filters/ContentSecurityPolicyAttribute.cs +++ b/BTCPayServer/Filters/ContentSecurityPolicyAttribute.cs @@ -105,7 +105,7 @@ namespace BTCPayServer.Filters { hasSelf = group.Any(g => g.Value.Contains("'self'", StringComparison.OrdinalIgnoreCase)); if (!hasSelf && !group.Any(g => g.Value.Contains("'none'", StringComparison.OrdinalIgnoreCase) || - g.Value.Contains("*", StringComparison.OrdinalIgnoreCase))) + g.Value.Contains('*', StringComparison.OrdinalIgnoreCase))) { policies.Add(new ConsentSecurityPolicy(group.Key, "'self'")); } diff --git a/BTCPayServer/Plugins/Shopify/Models/ShopifySettings.cs b/BTCPayServer/Plugins/Shopify/Models/ShopifySettings.cs index beb41a5ba..23767496f 100644 --- a/BTCPayServer/Plugins/Shopify/Models/ShopifySettings.cs +++ b/BTCPayServer/Plugins/Shopify/Models/ShopifySettings.cs @@ -29,7 +29,7 @@ namespace BTCPayServer.Plugins.Shopify.Models { get { - return ShopName?.Contains(".", StringComparison.OrdinalIgnoreCase) is true ? ShopName : $"https://{ShopName}.myshopify.com"; + return ShopName?.Contains('.', StringComparison.OrdinalIgnoreCase) is true ? ShopName : $"https://{ShopName}.myshopify.com"; } } } diff --git a/BTCPayServer/Plugins/Shopify/ShopifyApiClient.cs b/BTCPayServer/Plugins/Shopify/ShopifyApiClient.cs index 6e7b8d53c..7a600b428 100644 --- a/BTCPayServer/Plugins/Shopify/ShopifyApiClient.cs +++ b/BTCPayServer/Plugins/Shopify/ShopifyApiClient.cs @@ -38,7 +38,7 @@ namespace BTCPayServer.Plugins.Shopify string relativeUrl = null) { var url = - $"https://{(shopName.Contains(".", StringComparison.InvariantCulture) ? shopName : $"{shopName}.myshopify.com")}/{relativeUrl ?? ("admin/api/2020-07/" + action)}"; + $"https://{(shopName.Contains('.', StringComparison.InvariantCulture) ? shopName : $"{shopName}.myshopify.com")}/{relativeUrl ?? ("admin/api/2020-07/" + action)}"; var req = new HttpRequestMessage(method, url); return req; } diff --git a/Build/Common.csproj b/Build/Common.csproj index c8427b603..5eff5c831 100644 --- a/Build/Common.csproj +++ b/Build/Common.csproj @@ -4,6 +4,8 @@ $(TargetFrameworkOverride) NU1701,CA1816,CA1308,CA1810,CA2208,CA1303,CA2000,CA2016,CA1835,CA2249,CA9998,CA1704 10.0 + True + 6.0