Open elachlan opened 2 years ago
I started investigating CA1416
(https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1416). Winforms would have to swap out its OsVersion static class with OperatingSystem.IsWindowsVersionAtLeast().
@JeremyKuhne Coincidently this would remove the need for us to convert the NtDll PInvoke.
Edit: runtime does cache the OSVersion.
@RussKie CA2007 has single violation: https://github.com/dotnet/winforms/blob/e9a1042a6fd3718324237e843174e2cc5cc3c825/src/Microsoft.VisualBasic.Forms/src/Microsoft/VisualBasic/ApplicationServices/WindowsFormsApplicationBase.vb#L883-L886
I am unsure if ConfigureAwait(false)
is correct. I am pretty sure it is, since it should be resolved inside the Task.Run()
.
Turns out CA1804 is replaced by IDE0059? But IDE0059 is replacing values with underscores.
@elachlan, can you share your preferred contact email? I do not see it on your github profile. Like to reach out to you regarding a blog we plan to publish.
@dreddy-work thanks!
edited to remove.
@elachlan I think we're good here now, aren't we?
The ones that need to be addressed are marked as TODO
in CodeAnalysis.src.globalconfig
and CodeAnalysis.test.globalconfig
\winforms\eng\CodeAnalysis.src.globalconfig (8 hits)
Line 297: dotnet_diagnostic.CA1821.severity = none # TODO: warning
Line 466: dotnet_diagnostic.CA2208.severity = none # TODO: warning
Line 533: dotnet_diagnostic.CA2245.severity = none # TODO: warning
Line 851: dotnet_diagnostic.IL3000.severity = none # TODO: warning
Line 1097: # SA1206: Keyword ordering - TODO Re-enable as warning after https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3527
Line 1137: dotnet_diagnostic.SA1302.severity = none # TODO: warning
Line 1191: dotnet_diagnostic.SA1404.severity = none # TODO: warning
Line 1608: dotnet_diagnostic.IDE0059.severity = none # TODO: warning
\winforms\eng\CodeAnalysis.test.globalconfig (7 hits)
Line 7: dotnet_diagnostic.CA1052.severity = none # TODO: warning
Line 14: dotnet_diagnostic.CA1416.severity = none # TODO: warning
Line 26: dotnet_diagnostic.CA1810.severity = none # TODO: warning
Line 35: dotnet_diagnostic.CA1822.severity = none # TODO: warning
Line 48: dotnet_diagnostic.CA2007.severity = none # TODO: warning
Line 51: dotnet_diagnostic.CA2014.severity = none # TODO: warning
Line 327: dotnet_diagnostic.xUnit1004.severity = silent # TODO: warning
Is your feature request related to a problem? Please describe
List of diagnostics that need to be investigated, fixed, and enabled.
Describe the solution you'd like and alternatives you've considered
N/A
Will this feature affect UI controls?
N/A