# NOTE: Requires **VS2019 16.7** or later

# 'Usage' Rules from '9.0' release with 'All' analysis mode escalated to 'error' severity
# Description: 'Usage' Rules with enabled-by-default state from '9.0' release with 'All' analysis mode. Rules that are first released in a version later than '9.0' are disabled. Enabled rules with 'warning' severity are escalated to 'error' severity to respect 'CodeAnalysisTreatWarningsAsErrors' MSBuild property.

is_global = true

global_level = -99


# CA1816: Dispose methods should call SuppressFinalize
dotnet_diagnostic.CA1816.severity = error

# CA2200: Rethrow to preserve stack details
dotnet_diagnostic.CA2200.severity = error

# CA2201: Do not raise reserved exception types
dotnet_diagnostic.CA2201.severity = error

# CA2207: Initialize value type static fields inline
dotnet_diagnostic.CA2207.severity = error

# CA2208: Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = error

# CA2211: Non-constant fields should not be visible
dotnet_diagnostic.CA2211.severity = error

# CA2213: Disposable fields should be disposed
dotnet_diagnostic.CA2213.severity = error

# CA2214: Do not call overridable methods in constructors
dotnet_diagnostic.CA2214.severity = error

# CA2215: Dispose methods should call base class dispose
dotnet_diagnostic.CA2215.severity = error

# CA2216: Disposable types should declare finalizer
dotnet_diagnostic.CA2216.severity = error

# CA2217: Do not mark enums with FlagsAttribute
dotnet_diagnostic.CA2217.severity = error

# CA2218: Override GetHashCode on overriding Equals
dotnet_diagnostic.CA2218.severity = error

# CA2219: Do not raise exceptions in finally clauses
dotnet_diagnostic.CA2219.severity = error

# CA2224: Override Equals on overloading operator equals
dotnet_diagnostic.CA2224.severity = error

# CA2225: Operator overloads have named alternates
dotnet_diagnostic.CA2225.severity = error

# CA2226: Operators should have symmetrical overloads
dotnet_diagnostic.CA2226.severity = error

# CA2227: Collection properties should be read only
dotnet_diagnostic.CA2227.severity = error

# CA2231: Overload operator equals on overriding value type Equals
dotnet_diagnostic.CA2231.severity = error

# CA2234: Pass system uri objects instead of strings
dotnet_diagnostic.CA2234.severity = error

# CA2235: Mark all non-serializable fields
dotnet_diagnostic.CA2235.severity = error

# CA2237: Mark ISerializable types with serializable
dotnet_diagnostic.CA2237.severity = error

# CA2241: Provide correct arguments to formatting methods
dotnet_diagnostic.CA2241.severity = error

# CA2242: Test for NaN correctly
dotnet_diagnostic.CA2242.severity = error

# CA2243: Attribute string literals should parse correctly
dotnet_diagnostic.CA2243.severity = error

# CA2244: Do not duplicate indexed element initializations
dotnet_diagnostic.CA2244.severity = error

# CA2245: Do not assign a property to itself
dotnet_diagnostic.CA2245.severity = error

# CA2246: Assigning symbol and its member in the same statement
dotnet_diagnostic.CA2246.severity = error

# CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum
dotnet_diagnostic.CA2247.severity = error

# CA2248: Provide correct 'enum' argument to 'Enum.HasFlag'
dotnet_diagnostic.CA2248.severity = error

# CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
dotnet_diagnostic.CA2249.severity = error

# CA2250: Use 'ThrowIfCancellationRequested'
dotnet_diagnostic.CA2250.severity = error

# CA2251: Use 'string.Equals'
dotnet_diagnostic.CA2251.severity = error

# CA2253: Named placeholders should not be numeric values
dotnet_diagnostic.CA2253.severity = error

# CA2254: Template should be a static expression
dotnet_diagnostic.CA2254.severity = error

# CA2255: The 'ModuleInitializer' attribute should not be used in libraries
dotnet_diagnostic.CA2255.severity = error

# CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
dotnet_diagnostic.CA2256.severity = error

# CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
dotnet_diagnostic.CA2257.severity = error

# CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
dotnet_diagnostic.CA2258.severity = error

# CA2259: 'ThreadStatic' only affects static fields
dotnet_diagnostic.CA2259.severity = error

# CA2260: Use correct type parameter
dotnet_diagnostic.CA2260.severity = error

# CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
dotnet_diagnostic.CA2261.severity = error

# CA2262: Set 'MaxResponseHeadersLength' properly
dotnet_diagnostic.CA2262.severity = error

# CA2263: Prefer generic overload when type is known
dotnet_diagnostic.CA2263.severity = error

# CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'
dotnet_diagnostic.CA2264.severity = error

# CA2265: Do not compare Span<T> to 'null' or 'default'
dotnet_diagnostic.CA2265.severity = error
