Diagnostic Rules
Every Basilisk diagnostic has a unique code in the format BSK-EXXXX (error) or BSK-WXXXX (warning).
All rules are enabled by default. There is no opt-in.
| Group | Codes | Description |
|---|---|---|
| Missing Annotations | E0001–E0009 | Unannotated parameters, return types, variables, and attributes |
| Type Safety | E0010–E0025 | Type mismatches, incorrect annotations, unsound type usage |
| Ownership Safety | E0030–E0035 | Mojo-inspired ownership violations |
| Immutability | E0040–E0043 | Mutation of immutable parameters and Final variables |
| Structural Discipline | E0050–E0054 | Dynamic attributes, missing __init__, sealed class violations |
| Coercion Safety | E0060–E0063 | Implicit numeric and type coercions |
| Optional Safety | E0070–E0073 | Unsafe access on Optional values |
| Unused Code | W0080–W0089 | Unused imports, variables, functions, and unreachable branches |
| Code Quality | W0090–W0099 | Suppression comments, deprecated APIs, mutable defaults |