> ## Documentation Index
> Fetch the complete documentation index at: https://ancplua.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> Configure analyzer rules via .editorconfig.

All rules are configured via `.editorconfig` using `dotnet_diagnostic.<RuleId>.severity`.

## Severity Levels

| Level        | Build    | Description                    |
| ------------ | -------- | ------------------------------ |
| `error`      | Fails    | Must fix before build succeeds |
| `warning`    | Warns    | Shows in output, doesn't fail  |
| `suggestion` | IDE only | Shows in editor, not in build  |
| `none`       | Disabled | Rule is off                    |

## Defaults

```ini theme={null}
[*.cs]
# Errors - bugs that must be fixed
dotnet_diagnostic.AL0001.severity = error  # Primary constructor reassignment
dotnet_diagnostic.AL0003.severity = error  # Division by zero
dotnet_diagnostic.AL0007.severity = error  # GetSchema explicit implementation
dotnet_diagnostic.AL0008.severity = error  # GetSchema returns null
dotnet_diagnostic.AL0009.severity = error  # Don't call GetSchema
dotnet_diagnostic.AL0020.severity = error  # IFormCollection attribute
dotnet_diagnostic.AL0021.severity = error  # Multiple form sources
dotnet_diagnostic.AL0022.severity = error  # Mixed form collection/DTO
dotnet_diagnostic.AL0023.severity = error  # Unsupported form type
dotnet_diagnostic.AL0024.severity = error  # Form/body conflict

# Warnings - should fix
dotnet_diagnostic.AL0002.severity = warning  # Repeated negated patterns
dotnet_diagnostic.AL0004.severity = warning  # Span pattern matching
dotnet_diagnostic.AL0005.severity = warning  # Span SequenceEqual
dotnet_diagnostic.AL0006.severity = warning  # Field/parameter name conflict
dotnet_diagnostic.AL0011.severity = warning  # Lock on non-Lock
dotnet_diagnostic.AL0012.severity = warning  # Deprecated OTel convention
dotnet_diagnostic.AL0017.severity = warning  # Hardcoded version
dotnet_diagnostic.AL0018.severity = warning  # Version.props not imported
dotnet_diagnostic.AL0026.severity = warning  # DateTime.Now/UtcNow
dotnet_diagnostic.AL0027.severity = warning  # Newtonsoft.Json

# Suggestions - style preferences
dotnet_diagnostic.AL0013.severity = suggestion  # Missing schema URL
dotnet_diagnostic.AL0014.severity = suggestion  # Pattern matching style
dotnet_diagnostic.AL0015.severity = suggestion  # Null-guard style
dotnet_diagnostic.AL0016.severity = suggestion  # Declaration + null-check
dotnet_diagnostic.AL0025.severity = suggestion  # Static lambda

# Disabled by default
dotnet_diagnostic.AL0010.severity = none  # Type should be partial
```

## Disable a Rule

```ini theme={null}
[*.cs]
dotnet_diagnostic.AL0014.severity = none
```

## Disable All Rules

```ini theme={null}
[*.cs]
dotnet_diagnostic.AL0001.severity = none
dotnet_diagnostic.AL0002.severity = none
# ... repeat for each rule
```

Or exclude the analyzer package entirely in your project file.
