Lint
Last updated
Was this helpful?
Last updated
Was this helpful?
Paradime provides built-in code quality tools to help maintain consistent formatting and style in your dbt™ project. The Lint feature automatically applies the appropriate formatting tool based on your file type.
Click the Lint button in the Command Panel while editing a file to automatically format your code. The tool used for formatting is determined by the file type you have open in the editor:
SQLfluff - runs to lint your SQL code if you're editing a .sql
file.
Prettier - runs to lint your YAML if you're editing a .yml
file.
SQLfluff is a SQL linter that helps maintain consistent SQL code style and catch potential errors. It understands dbt™ and Jinja templating, making it perfect for dbt™ projects.
Before using SQLfluff, create a configuration file to customize its behavior:
Create a .sqlfluff
file in your dbt™ project root directory (same location as your dbt_project.yml
)
Add your configuration:
Visit SQLfluff documentation for a complete list of configuration options.
Open a .sql
file in your editor
Click the Lint button in the Command Panel
Review the changes made in Git Lite
Syntax errors
Style violations
Formatting suggestions
If satisfied with Lint updates, Commit and Push your changes to your remote branch.
Want to automate SQLfluff linting? Learn how to set up SQLfluff pre-commit hooks to automatically lint SQL files before each commit.
Prettier automatically formats your YAML files to ensure consistent structure across your dbt™ project. While the integration works out of the box, you can customize Prettier's behavior:
While Prettier works out of the box with sensible defaults, you can customize its behavior:
Create a .prettierrc.yaml
file in your dbt™ project root directory (same location as your dbt_project.yml
)
Add your configuration:
Visit prettier documentation a complete list of configuration options.
Open a .yml
file in your editor
Click the Lint button in the Command Panel
Review the changes in Git Lite
YAML syntax corrections
Formatting improvements
Structure updates
If satisfied with Lint updates, Commit and Push your changes to your remote branch
Want to automate YAML formatting? Learn how to set up Prettier pre-commit hooks to automatically format YAML files before each commit.