diff --git a/.editorconfig b/.editorconfig index 74bee9b59..318420b04 100644 --- a/.editorconfig +++ b/.editorconfig @@ -194,7 +194,6 @@ dotnet_diagnostic.CA1819.severity = suggestion dotnet_diagnostic.CA1822.severity = suggestion dotnet_diagnostic.CA1823.severity = suggestion dotnet_diagnostic.CA1824.severity = suggestion -dotnet_diagnostic.CA1847.severity = suggestion dotnet_diagnostic.CA2000.severity = suggestion dotnet_diagnostic.CA2002.severity = suggestion dotnet_diagnostic.CA2007.severity = suggestion diff --git a/src/NzbDrone.Common/Extensions/StringExtensions.cs b/src/NzbDrone.Common/Extensions/StringExtensions.cs index 2bdb5406c..75e5462f4 100644 --- a/src/NzbDrone.Common/Extensions/StringExtensions.cs +++ b/src/NzbDrone.Common/Extensions/StringExtensions.cs @@ -131,7 +131,7 @@ namespace NzbDrone.Common.Extensions public static string WrapInQuotes(this string text) { - if (!text.Contains(" ")) + if (!text.Contains(' ')) { return text; } @@ -240,7 +240,7 @@ namespace NzbDrone.Common.Extensions public static string ToUrlHost(this string input) { - return input.Contains(":") ? $"[{input}]" : input; + return input.Contains(':') ? $"[{input}]" : input; } } } diff --git a/src/NzbDrone.Core/Datastore/Migration/163_mediainfo_to_ffmpeg.cs b/src/NzbDrone.Core/Datastore/Migration/163_mediainfo_to_ffmpeg.cs index 6fcc45a7d..7889666d5 100644 --- a/src/NzbDrone.Core/Datastore/Migration/163_mediainfo_to_ffmpeg.cs +++ b/src/NzbDrone.Core/Datastore/Migration/163_mediainfo_to_ffmpeg.cs @@ -627,13 +627,13 @@ namespace NzbDrone.Core.Datastore.Migration try { - if (audioChannelPositions.Contains("+")) + if (audioChannelPositions.Contains('+')) { return audioChannelPositions.Split('+') .Sum(s => decimal.Parse(s.Trim(), CultureInfo.InvariantCulture)); } - if (audioChannelPositions.Contains("/")) + if (audioChannelPositions.Contains('/')) { var channelStringList = Regex.Replace(audioChannelPositions, @"^\d+\sobjects", diff --git a/src/NzbDrone.Core/Localization/LocalizationService.cs b/src/NzbDrone.Core/Localization/LocalizationService.cs index aefe7c04b..aa184e6dd 100644 --- a/src/NzbDrone.Core/Localization/LocalizationService.cs +++ b/src/NzbDrone.Core/Localization/LocalizationService.cs @@ -133,7 +133,7 @@ namespace NzbDrone.Core.Localization await CopyInto(dictionary, baseFilenamePath).ConfigureAwait(false); - if (culture.Contains("_")) + if (culture.Contains('_')) { var languageBaseFilenamePath = Path.Combine(prefix, GetResourceFilename(culture.Split('_')[0])); await CopyInto(dictionary, languageBaseFilenamePath).ConfigureAwait(false); diff --git a/src/NzbDrone.Core/Parser/SceneChecker.cs b/src/NzbDrone.Core/Parser/SceneChecker.cs index 2ecd20fb5..a09a11daa 100644 --- a/src/NzbDrone.Core/Parser/SceneChecker.cs +++ b/src/NzbDrone.Core/Parser/SceneChecker.cs @@ -6,12 +6,12 @@ // It's better not to use a title that might be scene than to use one that isn't scene public static bool IsSceneTitle(string title) { - if (!title.Contains(".")) + if (!title.Contains('.')) { return false; } - if (title.Contains(" ")) + if (title.Contains(' ')) { return false; } diff --git a/src/Sonarr.Http/Frontend/Mappers/IndexHtmlMapper.cs b/src/Sonarr.Http/Frontend/Mappers/IndexHtmlMapper.cs index 79d5d326f..d8cbaab63 100644 --- a/src/Sonarr.Http/Frontend/Mappers/IndexHtmlMapper.cs +++ b/src/Sonarr.Http/Frontend/Mappers/IndexHtmlMapper.cs @@ -35,7 +35,7 @@ namespace Sonarr.Http.Frontend.Mappers return !resourceUrl.StartsWith("/content") && !resourceUrl.StartsWith("/mediacover") && - !resourceUrl.Contains(".") && + !resourceUrl.Contains('.') && !resourceUrl.StartsWith("/login"); } }