Linting
LeapSQL includes a comprehensive linter with 32 SQL rules and 13 project rules.
Rule Types
- SQL Rules: Analyze individual SQL statements for style, correctness, and best practices
- Project Rules: Analyze DAG structure, model organization, and data lineage
Severity Levels
| Severity | Description |
|---|---|
error | Critical issue that should be fixed |
warning | Potential issue that should be reviewed |
info | Informational feedback |
hint | Suggestion for improvement |
Configuration
Rules can be configured in leapsql.yaml:
yaml
lint:
rules:
AM01: off # disable rule
AL06:
severity: error # override severity
max_length: 30 # rule-specific optionRule Categories
SQL Rules
| Category | Prefix | Description |
|---|---|---|
| Aliasing | AL | Alias usage and naming |
| Ambiguous | AM | Ambiguous SQL constructs |
| Convention | CV | SQL coding conventions |
| References | RF | Column and table references |
| Structure | ST | Query structure |
Project Rules
| Category | Prefix | Description |
|---|---|---|
| Modeling | PM | Model structure and organization |
| Lineage | PL | Data lineage and dependencies |
| Structure | PS | Project structure and naming |