Expand description
Lint Engine for Seq
A clippy-inspired lint tool that detects common patterns and suggests improvements. Phase 1: Syntactic pattern matching on word sequences.
§Architecture
LintConfig- Parsed lint rules from TOMLPattern- Compiled pattern for matchingLinter- Walks AST and finds matchesLintDiagnostic- Output format compatible with LSP
§Known Limitations (Phase 1)
- No quotation boundary awareness: Patterns match across statement boundaries
within a word body. Patterns like
[ dropwould incorrectly match[followed bydropanywhere, not just at quotation start. Such patterns should be avoided until Phase 2 adds quotation-aware matching.
Structs§
- Compiled
Pattern - A compiled pattern for efficient matching
- Lint
Config - Lint configuration containing all rules
- Lint
Diagnostic - A lint diagnostic (match found)
- Lint
Rule - A single lint rule from configuration
- Linter
- The linter engine
Enums§
- Pattern
Element - Element in a compiled pattern
- Severity
- Severity level for lint diagnostics
Statics§
- DEFAULT_
LINTS - Embedded default lint rules
Functions§
- format_
diagnostics - Format diagnostics for CLI output