root = true

[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.go]
indent_style = tab
indent_size = 4

[*.cs]
charset = utf-8
indent_style = space
indent_size = 4

[*.{csproj,props}]
charset = utf-8
indent_style = space
indent_size = 2

[Dockerfile]
charset = utf-8
indent_style = space
indent_size = 4

[{appsettings.json,appsettings.*.json}]
charset = utf-8
indent_style = space
indent_size = 2

[*.cs]

# C# Standards
# CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
dotnet_diagnostic.CS1998.severity = none

# Nullable Reference Types
# CS8618: Non-nullable field is uninitialized. Consider declaring as nullable.
dotnet_diagnostic.CS8618.severity = error

# CS8604: Possible null reference argument.
dotnet_diagnostic.CS8604.severity = error

# CS8629: Nullable value type may be null.
dotnet_diagnostic.CS8629.severity = error

# CS8600: Converting null literal or possible null value to non-nullable type.
dotnet_diagnostic.CS8600.severity = error

# CS8603: Possible null reference return.
dotnet_diagnostic.CS8603.severity = error

# CS8610: Nullability of reference types in type of parameter doesn't match overridden member.
dotnet_diagnostic.CS8610.severity = error

# CS8625: Cannot convert null literal to non-nullable reference type.
dotnet_diagnostic.CS8625.severity = error

# CS8606: Possible null reference assignment to iteration variable
dotnet_diagnostic.CS8606.severity = error

# CS8602: Dereference of a possibly null reference.
dotnet_diagnostic.CS8602.severity = error

# CS8601: Possible null reference assignment.
dotnet_diagnostic.CS8601.severity = error

# CS8614: Nullability of reference types in type of parameter doesn't match implicitly implemented member.
dotnet_diagnostic.CS8614.severity = error

# CS8765: Nullability of type of parameter 'obj' doesn't match overridden member (possibly because of nullability attributes).
dotnet_diagnostic.CS8765.severity = error

# CS8619: Nullability of reference types in value of type 'GenericType<T?>' doesn't match target type 'GenericType<T>'.
dotnet_diagnostic.CS8619.severity = error

# =================
# Analyzer Rulesets
# =================

# Microsoft.CodeAnalysis.BannedApiAnalyzers
# RS0030: Banned API
dotnet_diagnostic.RS0030.severity = error

# Microsoft.VisualStudio.Threading.Analyzers
# VSTHRD100: Avoid async void methods
dotnet_diagnostic.VSTHRD100.severity = error

# VSTHRD101: Avoid unsupported async delegates
dotnet_diagnostic.VSTHRD101.severity = error

# VSTHRD110: Observe result of async calls
dotnet_diagnostic.VSTHRD110.severity = error

# VSTHRD003 Avoid awaiting foreign Tasks
dotnet_diagnostic.VSTHRD003.severity = none

# =================
# Format Rulesets
# =================

# IDE0005: Remove unnecessary imports
dotnet_diagnostic.IDE0005.severity = warning

# IDE0160: Convert to file-scoped namespace
csharp_style_namespace_declarations = file_scoped:warning

# =================
# Too Match Detail Rulesets
# =================

# CONSIDER: Are IDE0051 and IDE0052 too noisy to be warnings for IDE editing scenarios? Should they be made build-only warnings?
# IDE0051: Remove unused private member
dotnet_diagnostic.IDE0051.severity = warning

# IDE0052: Remove unread private member
dotnet_diagnostic.IDE0052.severity = warning
