[Awake] Enable analyzer and fix warnings (#16899)

* [Awake] Enable analyzer and fix warnings

* Suppress "CA1051:Do not declare visible instance fields" for structs

* Revert "Suppress "CA1051:Do not declare visible instance fields" for structs"

This reverts commit bea215bffa.

* Suppress "CA1051:Do not declare visible instance fields" for structs

* spellchecker
This commit is contained in:
CleanCodeDeveloper 2022-03-09 13:09:17 +01:00 committed by GitHub
parent 46684966a1
commit 425346b1f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 3 deletions

View File

@ -2052,6 +2052,7 @@ stringtable
stringval
Strmiids
strsafe
structs
strutil
sttngs
Stubless

View File

@ -5,3 +5,6 @@ dotnet_diagnostic.SA1201.severity = none
# CA1303: Do not pass literals as localized parameters
dotnet_diagnostic.CA1303.severity = suggestion
# CA1051: Do not declare visible instance fields
dotnet_code_quality.ca1051.exclude_structs = true

View File

@ -15,6 +15,8 @@
<Company>Microsoft Corporation</Company>
<Version>$(Version).0</Version>
<ApplicationIcon>Images\Awake.ico</ApplicationIcon>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>Recommended</AnalysisMode>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

View File

@ -36,9 +36,9 @@ namespace Awake
// the pull request is issued.
private static readonly string BuildId = "ARBITER_01312022";
private static Mutex? _mutex = null;
private static FileSystemWatcher? _watcher = null;
private static SettingsUtils? _settingsUtils = null;
private static Mutex? _mutex;
private static FileSystemWatcher? _watcher;
private static SettingsUtils? _settingsUtils;
public static Mutex LockMutex { get => _mutex; set => _mutex = value; }