Disable a bunch of slow Analyzer rules
thanks Morilli for the data
This commit is contained in:
parent
b0c2ef831c
commit
4a26273379
|
@ -16,6 +16,8 @@ csharp_indent_labels = one_less_than_current
|
||||||
# Style rules
|
# Style rules
|
||||||
# Can't be in .globalconfig because dotnet format doesn't respect that https://github.com/dotnet/format/issues/1643
|
# Can't be in .globalconfig because dotnet format doesn't respect that https://github.com/dotnet/format/issues/1643
|
||||||
|
|
||||||
|
# Remove `this` or `Me` qualification
|
||||||
|
dotnet_diagnostic.IDE0003.severity = silent
|
||||||
# Remove unnecessary cast
|
# Remove unnecessary cast
|
||||||
dotnet_diagnostic.IDE0004.severity = warning
|
dotnet_diagnostic.IDE0004.severity = warning
|
||||||
# Remove unnecessary import
|
# Remove unnecessary import
|
||||||
|
@ -23,21 +25,29 @@ dotnet_diagnostic.IDE0005.severity = warning
|
||||||
# Use var instead of explicit type
|
# Use var instead of explicit type
|
||||||
dotnet_diagnostic.IDE0007.severity = suggestion
|
dotnet_diagnostic.IDE0007.severity = suggestion
|
||||||
# Use explicit type instead of var
|
# Use explicit type instead of var
|
||||||
dotnet_diagnostic.IDE0008.severity = suggestion
|
dotnet_diagnostic.IDE0008.severity = silent
|
||||||
|
# Add `this` or `Me` qualification
|
||||||
|
dotnet_diagnostic.IDE0009.severity = silent
|
||||||
# Inline variable declaration
|
# Inline variable declaration
|
||||||
dotnet_diagnostic.IDE0018.severity = warning
|
dotnet_diagnostic.IDE0018.severity = warning
|
||||||
# Use pattern matching to avoid as followed by a null check
|
# Use pattern matching to avoid as followed by a null check
|
||||||
dotnet_diagnostic.IDE0019.severity = warning
|
dotnet_diagnostic.IDE0019.severity = warning
|
||||||
# Use pattern matching to avoid is check followed by a cast (with variable)
|
# Use pattern matching to avoid is check followed by a cast (with variable)
|
||||||
dotnet_diagnostic.IDE0020.severity = warning
|
dotnet_diagnostic.IDE0020.severity = warning
|
||||||
|
# Use expression body for constructors
|
||||||
|
dotnet_diagnostic.IDE0021.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
|
||||||
# Use expression body for methods
|
# Use expression body for methods
|
||||||
dotnet_diagnostic.IDE0022.severity = suggestion
|
dotnet_diagnostic.IDE0022.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
|
||||||
|
# Use expression body for conversion operators
|
||||||
|
dotnet_diagnostic.IDE0023.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
|
||||||
|
# Use expression body for operators
|
||||||
|
dotnet_diagnostic.IDE0024.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
|
||||||
# Use expression body for properties
|
# Use expression body for properties
|
||||||
dotnet_diagnostic.IDE0025.severity = suggestion
|
dotnet_diagnostic.IDE0025.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
|
||||||
# Use expression body for indexers
|
# Use expression body for indexers
|
||||||
dotnet_diagnostic.IDE0026.severity = suggestion
|
dotnet_diagnostic.IDE0026.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
|
||||||
# Use expression body for accessors
|
# Use expression body for accessors
|
||||||
dotnet_diagnostic.IDE0027.severity = suggestion
|
dotnet_diagnostic.IDE0027.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
|
||||||
# Null check can be simplified
|
# Null check can be simplified
|
||||||
dotnet_diagnostic.IDE0029.severity = warning
|
dotnet_diagnostic.IDE0029.severity = warning
|
||||||
# Null check can be simplified
|
# Null check can be simplified
|
||||||
|
@ -65,6 +75,8 @@ dotnet_diagnostic.IDE0054.severity = warning
|
||||||
dotnet_diagnostic.IDE0056.severity = suggestion
|
dotnet_diagnostic.IDE0056.severity = suggestion
|
||||||
# Use range operator
|
# Use range operator
|
||||||
dotnet_diagnostic.IDE0057.severity = suggestion
|
dotnet_diagnostic.IDE0057.severity = suggestion
|
||||||
|
# Use expression body for local functions
|
||||||
|
dotnet_diagnostic.IDE0061.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
|
||||||
# Use simple using statement
|
# Use simple using statement
|
||||||
dotnet_diagnostic.IDE0063.severity = suggestion
|
dotnet_diagnostic.IDE0063.severity = suggestion
|
||||||
# Make struct fields writable
|
# Make struct fields writable
|
||||||
|
|
|
@ -67,6 +67,10 @@ dotnet_diagnostic.CA1305.severity = error
|
||||||
dotnet_code_quality.CA1305.excluded_symbol_names = T:System.Byte|T:System.SByte|T:System.Int16|T:System.UInt16|T:System.Int32|T:System.UInt32|T:System.Int64|T:System.UInt64|T:System.String|T:System.Text.StringBuilder|T:System.Convert
|
dotnet_code_quality.CA1305.excluded_symbol_names = T:System.Byte|T:System.SByte|T:System.Int16|T:System.UInt16|T:System.Int32|T:System.UInt32|T:System.Int64|T:System.UInt64|T:System.String|T:System.Text.StringBuilder|T:System.Convert
|
||||||
# Specify marshalling for P/Invoke string arguments
|
# Specify marshalling for P/Invoke string arguments
|
||||||
dotnet_diagnostic.CA2101.severity = suggestion
|
dotnet_diagnostic.CA2101.severity = suggestion
|
||||||
|
# Specify StringComparison for clarity
|
||||||
|
dotnet_diagnostic.CA1307.severity = silent # SpecifyStringComparisonAnalyzer very slow
|
||||||
|
# Specify StringComparison for correctness
|
||||||
|
dotnet_diagnostic.CA1310.severity = silent # SpecifyStringComparisonAnalyzer very slow
|
||||||
|
|
||||||
## Performance rules
|
## Performance rules
|
||||||
|
|
||||||
|
@ -100,6 +104,8 @@ dotnet_diagnostic.CA1816.severity = none
|
||||||
dotnet_diagnostic.CA2201.severity = suggestion
|
dotnet_diagnostic.CA2201.severity = suggestion
|
||||||
# Implement serialization constructors
|
# Implement serialization constructors
|
||||||
dotnet_diagnostic.CA2229.severity = silent
|
dotnet_diagnostic.CA2229.severity = silent
|
||||||
|
# Opt in to preview features before using them
|
||||||
|
dotnet_diagnostic.CA2252.severity = silent # CSharpDetectPreviewFeatureAnalyzer very slow
|
||||||
|
|
||||||
## .NET DocumentationAnalyzers style rules
|
## .NET DocumentationAnalyzers style rules
|
||||||
|
|
||||||
|
@ -202,7 +208,7 @@ dotnet_diagnostic.MA0030.severity = error
|
||||||
# Optimize Enumerable.Count() usage
|
# Optimize Enumerable.Count() usage
|
||||||
dotnet_diagnostic.MA0031.severity = error
|
dotnet_diagnostic.MA0031.severity = error
|
||||||
# Use an overload with a CancellationToken argument
|
# Use an overload with a CancellationToken argument
|
||||||
dotnet_diagnostic.MA0032.severity = silent
|
dotnet_diagnostic.MA0032.severity = silent # UseAnOverloadThatHasCancellationTokenAnalyzer very slow
|
||||||
# Do not tag instance fields with ThreadStaticAttribute
|
# Do not tag instance fields with ThreadStaticAttribute
|
||||||
dotnet_diagnostic.MA0033.severity = error
|
dotnet_diagnostic.MA0033.severity = error
|
||||||
# Do not use dangerous threading methods
|
# Do not use dangerous threading methods
|
||||||
|
@ -216,17 +222,17 @@ dotnet_diagnostic.MA0038.severity = silent
|
||||||
# Do not write your own certificate validation method
|
# Do not write your own certificate validation method
|
||||||
dotnet_diagnostic.MA0039.severity = error
|
dotnet_diagnostic.MA0039.severity = error
|
||||||
# Flow the cancellation token
|
# Flow the cancellation token
|
||||||
dotnet_diagnostic.MA0040.severity = error
|
dotnet_diagnostic.MA0040.severity = silent # UseAnOverloadThatHasCancellationTokenAnalyzer very slow
|
||||||
# Make property static
|
# Make property static
|
||||||
dotnet_diagnostic.MA0041.severity = silent
|
dotnet_diagnostic.MA0041.severity = silent
|
||||||
# Do not use blocking calls in an async method
|
# Do not use blocking calls in an async method
|
||||||
dotnet_diagnostic.MA0042.severity = error
|
dotnet_diagnostic.MA0042.severity = silent # DoNotUseBlockingCallInAsyncContextAnalyzer very slow
|
||||||
# Use nameof operator in ArgumentException
|
# Use nameof operator in ArgumentException
|
||||||
dotnet_diagnostic.MA0043.severity = error
|
dotnet_diagnostic.MA0043.severity = error
|
||||||
# Remove useless ToString call
|
# Remove useless ToString call
|
||||||
dotnet_diagnostic.MA0044.severity = warning
|
dotnet_diagnostic.MA0044.severity = warning
|
||||||
# Do not use blocking call in a sync method (need to make containing method async)
|
# Do not use blocking call in a sync method (need to make containing method async)
|
||||||
dotnet_diagnostic.MA0045.severity = silent
|
dotnet_diagnostic.MA0045.severity = silent # DoNotUseBlockingCallInAsyncContextAnalyzer very slow
|
||||||
# Use EventHandler<T> to declare events
|
# Use EventHandler<T> to declare events
|
||||||
dotnet_diagnostic.MA0046.severity = silent
|
dotnet_diagnostic.MA0046.severity = silent
|
||||||
# Declare types in namespaces
|
# Declare types in namespaces
|
||||||
|
@ -294,9 +300,9 @@ dotnet_diagnostic.MA0077.severity = error
|
||||||
# Use 'Cast' instead of 'Select' to cast
|
# Use 'Cast' instead of 'Select' to cast
|
||||||
dotnet_diagnostic.MA0078.severity = error
|
dotnet_diagnostic.MA0078.severity = error
|
||||||
# Flow the cancellation token using .WithCancellation()
|
# Flow the cancellation token using .WithCancellation()
|
||||||
dotnet_diagnostic.MA0079.severity = error
|
dotnet_diagnostic.MA0079.severity = silent # UseAnOverloadThatHasCancellationTokenAnalyzer very slow
|
||||||
# Use a cancellation token using .WithCancellation()
|
# Use a cancellation token using .WithCancellation()
|
||||||
dotnet_diagnostic.MA0080.severity = error
|
dotnet_diagnostic.MA0080.severity = silent # UseAnOverloadThatHasCancellationTokenAnalyzer very slow
|
||||||
# Method overrides should not omit params keyword
|
# Method overrides should not omit params keyword
|
||||||
dotnet_diagnostic.MA0081.severity = error
|
dotnet_diagnostic.MA0081.severity = error
|
||||||
# NaN should not be used in comparisons
|
# NaN should not be used in comparisons
|
||||||
|
@ -454,7 +460,7 @@ dotnet_diagnostic.SA1004.severity = silent
|
||||||
# Single line comments should begin with single space
|
# Single line comments should begin with single space
|
||||||
dotnet_diagnostic.SA1005.severity = silent
|
dotnet_diagnostic.SA1005.severity = silent
|
||||||
# Preprocessor keywords should not be preceded by space
|
# Preprocessor keywords should not be preceded by space
|
||||||
dotnet_diagnostic.SA1006.severity = error
|
dotnet_diagnostic.SA1006.severity = silent # SA1006PreprocessorKeywordsMustNotBePrecededBySpace very slow
|
||||||
# Opening parenthesis should be spaced correctly
|
# Opening parenthesis should be spaced correctly
|
||||||
dotnet_diagnostic.SA1008.severity = silent
|
dotnet_diagnostic.SA1008.severity = silent
|
||||||
# Closing parenthesis should be spaced correctly
|
# Closing parenthesis should be spaced correctly
|
||||||
|
@ -471,6 +477,8 @@ dotnet_diagnostic.SA1013.severity = silent
|
||||||
dotnet_diagnostic.SA1015.severity = silent
|
dotnet_diagnostic.SA1015.severity = silent
|
||||||
# Member access symbols should be spaced correctly
|
# Member access symbols should be spaced correctly
|
||||||
dotnet_diagnostic.SA1019.severity = error
|
dotnet_diagnostic.SA1019.severity = error
|
||||||
|
# Increment decrement symbols should be spaced correctly
|
||||||
|
dotnet_diagnostic.SA1020.severity = silent # SA1020IncrementDecrementSymbolsMustBeSpacedCorrectly very slow
|
||||||
# Negative signs should be spaced correctly
|
# Negative signs should be spaced correctly
|
||||||
dotnet_diagnostic.SA1021.severity = silent
|
dotnet_diagnostic.SA1021.severity = silent
|
||||||
# Dereference and access of symbols should be spaced correctly
|
# Dereference and access of symbols should be spaced correctly
|
||||||
|
@ -509,7 +517,7 @@ dotnet_diagnostic.SA1118.severity = silent
|
||||||
# Comments should contain text
|
# Comments should contain text
|
||||||
dotnet_diagnostic.SA1120.severity = warning
|
dotnet_diagnostic.SA1120.severity = warning
|
||||||
# Use built-in type alias
|
# Use built-in type alias
|
||||||
dotnet_diagnostic.SA1121.severity = error
|
dotnet_diagnostic.SA1121.severity = silent # SA1121UseBuiltInTypeAlias very slow
|
||||||
# Use string.Empty for empty strings
|
# Use string.Empty for empty strings
|
||||||
dotnet_diagnostic.SA1122.severity = silent
|
dotnet_diagnostic.SA1122.severity = silent
|
||||||
# Generic type constraints should be on their own line
|
# Generic type constraints should be on their own line
|
||||||
|
|
Loading…
Reference in New Issue