Categories
| Category | Rules | Examples |
|---|---|---|
| Design | 4 | Primary constructor patterns, type partialness |
| Usage | 6 | Span comparisons, IXmlSerializable, static lambdas |
| Style | 3 | Pattern matching, null-guard normalization |
| ASP.NET Core | 5 | Form binding, parameter validation |
| OpenTelemetry | 2 | Semantic conventions, schema URLs |
| Threading | 1 | Lock statement best practices |
| Reliability | 1 | Division by zero prevention |
| VersionManagement | 1 | Hardcoded package version detection |
Rules
| Id | Category | Description | Severity | Fix |
|---|---|---|---|---|
| AL0001 | Design | Prohibit reassignment of primary constructor parameters | Error | - |
| AL0002 | Design | Don’t repeat negated patterns | Warning | Yes |
| AL0003 | Reliability | Don’t divide by constant zero | Error | - |
| AL0004 | Usage | Use pattern matching for Span constants | Warning | Yes |
| AL0005 | Usage | Use SequenceEqual for Span non-constants | Warning | Yes |
| AL0006 | Design | Field name conflicts with primary constructor | Warning | - |
| AL0007 | Usage | GetSchema should be explicitly implemented | Error | - |
| AL0008 | Usage | GetSchema must return null | Error | Yes |
| AL0009 | Usage | Don’t call IXmlSerializable.GetSchema | Error | - |
| AL0010 | Design | Type should be partial | Info | Yes |
| AL0011 | Threading | Avoid lock on non-Lock types | Warning | - |
| AL0012 | OpenTelemetry | Deprecated semantic convention | Warning | Yes |
| AL0013 | OpenTelemetry | Missing telemetry schema URL | Info | - |
| AL0014 | Style | Prefer pattern matching for null/zero | Info | Yes |
| AL0015 | Style | Normalize null-guard style | Info | Yes |
| AL0016 | Style | Combine declaration with null-check | Info | Yes |
| AL0017 | VersionManagement | Hardcoded package version | Warning | - |
| AL0020 | ASP.NET Core | IFormCollection requires explicit attribute | Error | - |
| AL0021 | ASP.NET Core | Multiple structured form sources | Error | - |
| AL0022 | ASP.NET Core | Mixed form collection and DTO | Error | - |
| AL0023 | ASP.NET Core | Unsupported form type | Error | - |
| AL0024 | ASP.NET Core | Form and body conflict | Error | - |
| AL0025 | Usage | Anonymous function can be static | Info | Yes |
Refactorings
Configuration
Configure via.editorconfig. See Configuration.
