diff --git a/.editorconfig b/.editorconfig index e2be1328..d2cf3e9a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -89,6 +89,7 @@ dotnet_naming_symbols.constant_fields.required_modifiers = const dotnet_style_operator_placement_when_wrapping = beginning_of_line tab_width = 4 end_of_line = crlf +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion ############################### # C# Coding Conventions # @@ -317,3 +318,5 @@ csharp_style_expression_bodied_local_functions = false:silent # CA2201: Do not raise reserved exception types dotnet_diagnostic.CA2201.severity = none +csharp_style_prefer_primary_constructors = true:suggestion +dotnet_diagnostic.SA1010.severity = suggestion diff --git a/OnlyM.Core/Services/Monitors/MonitorsService.cs b/OnlyM.Core/Services/Monitors/MonitorsService.cs index cc3fd0b9..e7e10a4b 100644 --- a/OnlyM.Core/Services/Monitors/MonitorsService.cs +++ b/OnlyM.Core/Services/Monitors/MonitorsService.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Globalization; using System.Linq; using System.Windows.Forms; using OnlyM.Core.Models; diff --git a/OnlyM/AutoUpdates/VersionDetection.cs b/OnlyM/AutoUpdates/VersionDetection.cs index e089b859..1af4cecc 100644 --- a/OnlyM/AutoUpdates/VersionDetection.cs +++ b/OnlyM/AutoUpdates/VersionDetection.cs @@ -19,7 +19,9 @@ internal static class VersionDetection try { +#pragma warning disable U2U1025 using var client = new HttpClient(); +#pragma warning restore U2U1025 var response = client.GetAsync(LatestReleaseUrl).Result; if (response.IsSuccessStatusCode) diff --git a/OnlyMSlideManager/App.xaml.cs b/OnlyMSlideManager/App.xaml.cs index a5fe92d0..d019eda2 100644 --- a/OnlyMSlideManager/App.xaml.cs +++ b/OnlyMSlideManager/App.xaml.cs @@ -14,7 +14,9 @@ namespace OnlyMSlideManager { +#pragma warning disable CA1001 public partial class App : Application +#pragma warning restore CA1001 { private readonly string _appString = "OnlyMSlideManagerTool"; private Mutex? _appMutex;