SonarSource / sonar-dotnet

Code analyzer for C# and VB.NET projects
https://redirect.sonarsource.com/plugins/csharp.html
GNU Lesser General Public License v3.0
795 stars 228 forks source link

S4423 Improve performance: WeakSslTlsProtocols #4352

Open andrei-epure-sonarsource opened 3 years ago

andrei-epure-sonarsource commented 3 years ago

See sonar-dotnet Performance analysis (28 April 2021).

This rule takes 27 seconds on EfCore and is in top10 most hungry rules.

pavel-mikula-sonarsource commented 3 years ago

Don't ask for GetTypeInfo without a namecheck for SslProtocols and SecurityProtocolType, when specified as member binding. Don't ask for Something().Default syntaxes.

Add test cases for static import of the enum.