Skip to content

rules

List all available lint rules with their documentation.

Rules are organized by type (SQL or project) and group (e.g., aliasing, modeling). Use --verbose to see full documentation including examples and fix guidance.

Output adapts to environment:

  • Terminal: Styled output with colors
  • Piped/Scripted: Markdown format
  • JSON: Machine-readable format

Usage

bash
leapsql rules [rule-id] [flags]

Options

OptionShortDefaultDescription
--format-fOutput format: text, json, markdown
--group-gFilter by group
--typeFilter by type: sql, project
--verbose-VfalseShow full documentation

Global Options

OptionShortDefaultDescription
--configconfig file (default: ./leapsql.yaml)
--databasePath to DuckDB database (empty for in-memory)
--envEnvironment name
--macros-dirPath to macros directory
--models-dirPath to models directory
--output-oOutput format (auto|text|markdown|json)
--project-dir-CProject root directory (auto-detected from models-dir or config file location)
--seeds-dirPath to seeds directory
--statePath to state database
--target-tTarget environment to use (e.g., dev, staging, prod)

Examples

bash
# List all rules
leapsql rules

# Show details for a specific rule
leapsql rules AM01

# List SQL rules only
leapsql rules --type sql

# List rules in the modeling group
leapsql rules --group modeling

# Show full documentation
leapsql rules -V

# Output as JSON
leapsql rules --format json

Released under the MIT License.