Skip to content

VDFaller/dbt-lint-yaml

Repository files navigation

dbt-lint-yaml

A dbt linter for YAML files.

This is a rust based CLI tool that takes inspiration from these three great tools:

The goal is to have something like ruff for the yaml portion of dbt projects.

Installation

You can install the latest release from GitHub:

Unix-like shells:

curl -fsSL https://raw.githubusercontent.com/VDFaller/dbt-lint-yaml/refs/heads/main/install.sh | sh -s -- --update

Windows PowerShell:

irm https://raw.githubusercontent.com/VDFaller/dbt-lint-yaml/refs/heads/main/install.ps1 | iex

In addition to Rust, the current write-back flow shells out to a Python helper that uses ruamel.yaml to preserve formatting. Make sure Python 3 is available on your $PATH (or your active environment's $PATH) and install the dependency with:

pip install ruamel.yaml

Usage

For now we're piggy-backing on dbt-sa-cli for command-line interface functionality.

dbt-lint-yaml
# or if you want auto fixes
dbt-lint-yaml --fix

The rules are controlled by a dbt-lint.yml file in the root of your dbt project. See the Configuration section for details on how to set up and customize the rules. The default rules can be found in the default-dbt-lint.yml file.

Current Rules

See the rules documentation for a full list of available rules and their descriptions.

About

a yaml linter for dbt projects.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors