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:
[sqlfluff]
dialect = snowflake # Update based on your warehouse
templater = dbt
[sqlfluff:templater:dbt]
project_dir = ./
# Common rules to exclude
exclude_rules = ambiguous.column_count, structure.column_order
# Line length limit
max_line_length = 120
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.
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:
# .prettierrc.yaml example file
yamlCopyparser: yaml
trailingComma: es5
tabWidth: 4
semi: false
singleQuote: true
printWidth: 100
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