Skip to content

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

SeverityDescription
errorCritical issue that should be fixed
warningPotential issue that should be reviewed
infoInformational feedback
hintSuggestion 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 option

Rule Categories

SQL Rules

CategoryPrefixDescription
AliasingALAlias usage and naming
AmbiguousAMAmbiguous SQL constructs
ConventionCVSQL coding conventions
ReferencesRFColumn and table references
StructureSTQuery structure

Project Rules

CategoryPrefixDescription
ModelingPMModel structure and organization
LineagePLData lineage and dependencies
StructurePSProject structure and naming

Released under the MIT License.