-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve Roslyn warnings, switch to latest C# features (#968)
This PR addresses or suppresses all (but one) of the warnings. Some existed prior to .NET 8 in #966, but the majority were introduced in #966. | Code | Description | Outcome | | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | | CA1724 | Type names should not match namespaces | Suppressed in limited cases for `Pickers` and `Store` | | CA1859 | Use concrete types when possible for improved performance | Fixed in production code, suppressed for tests | | CA1861 | Avoid constant arrays as arguments | Suppressed for tests | | CA1862 | Use the 'StringComparison' method overloads to perform case-insensitive string comparisons | Fixed | | CA2000 | Dispose objects before losing scope | Fixed | | CA2213 | Disposable fields should be disposed | Fixed, suppressed for most tests | | CA5392 | Use DefaultDllImportSearchPaths attribute for P/Invokes | Fixed | | CS0108 | 'TestProxyLayoutEngine.InnerLayoutEngine' hides inherited member 'BaseProxyLayoutEngine.InnerLayoutEngine'. Use the new keyword if hiding was intended. | Fixed | | IDE0005 | Remove unnecessary using directives | Fixed | | IDE0028 | Use collection initializers or expressions | Fixed | | IDE0290 | Use primary constructor | Fixed | | IDE0300 | Use collection expression for array | Fixed | | IDE0301 | Use collection expression for empty | Fixed | | IDE0303 | Use collection expression for Create() | Fixed | | IDE0305 | Use collection expression for fluent | Fixed | | SYSLIB0051 | Legacy serialization support APIs are obsolete | Fixed | | xUnit1048 | Avoid using 'async void' for test methods as it is deprecated in xUnit.net v3 | Fixed | | - | Set MSBuild property 'GenerateDocumentationFile' to 'true' in project file to enable IDE0005 (Remove unnecessary usings/imports) on build (dotnet/roslyn#41640) | Fixed | The only remaining warning is: ```log NETSDK1206 Found version-specific or distribution-specific runtime identifier(s): win10-arm64, win10-x64, win10-x86. Affected libraries: Microsoft.WindowsAppSDK. In .NET 8.0 and higher, assets for version-specific and distribution-specific runtime identifiers will not be found by default. See https://aka.ms/dotnet/rid-usage for details. ``` I also cheekily decreased the default focus indicator size in this PR.
- Loading branch information
Showing
205 changed files
with
1,102 additions
and
1,460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<GenerateDocumentationFile>false</GenerateDocumentationFile> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<NoWarn>$(NoWarn);CS1591</NoWarn> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.