# Lint

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.

### How It Works

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**](#sqlfluff) - runs to lint your SQL code if you're editing a `.sql` file.
* [**Prettier**](#prettier) - runs to lint your YAML if you're editing a `.yml` file.

<figure><img src="/files/klmyyTMoloAd4AnTDzvX" alt=""><figcaption></figcaption></figure>

***

### SQLFluff

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.

#### Configuring .sqlfluff

Before using SQLfluff, create a configuration file to customize its behavior:

1. Create a `.sqlfluff` file in your dbt™ project root directory (same location as your `dbt_project.yml`)
2. Add your configuration:

{% code title=".sqlfluff example file" %}

```yaml
[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
```

{% endcode %}

{% hint style="info" %}
Visit [SQLfluff documentation](https://docs.sqlfluff.com/en/stable/configuration.html) for a complete list of configuration options.
{% endhint %}

#### Using SQLfluff

1. Open a `.sql` file in your editor
2. Click the **Lint** button in the [Command Panel](/app-help/documentation/code-ide/command-panel.md)
3. Review the changes made in [Git Lite](/app-help/documentation/code-ide/left-panel/git-lite.md)
   * Syntax errors
   * Style violations
   * Formatting suggestions
4. If satisfied with Lint updates, [Commit and Push](/app-help/documentation/code-ide/left-panel/git-lite.md#commit-and-push-your-changes) your changes to your remote branch.&#x20;

{% @arcade/embed flowId="M3tkMiQ8rJHKsjustE4s" url="<https://app.arcade.software/share/M3tkMiQ8rJHKsjustE4s>" %}

{% hint style="info" %}
Want to automate SQLfluff linting? Learn how to set up [SQLfluff pre-commit hooks](/app-help/documentation/integrations/code-ide/pre-commit/sqlfluff-hooks.md) to automatically lint SQL files before each commit.
{% endhint %}

***

### Prettier

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:

#### Configuring Prettier

While Prettier works out of the box with sensible defaults, you can customize its behavior:

1. Create a `.prettierrc.yaml` file in your dbt™ project root directory (same location as your `dbt_project.yml`)
2. Add your configuration:

<pre class="language-yaml" data-title=".prettierrc.yaml example file"><code class="lang-yaml"># .prettierrc.yaml example file
<strong>yamlCopyparser: yaml
</strong>trailingComma: es5
tabWidth: 4
semi: false
singleQuote: true
printWidth: 100
</code></pre>

{% hint style="info" %}
Visit [prettier documentation](https://prettier.io/docs/en/configuration.html) a complete list of configuration options.
{% endhint %}

#### Using Prettier

1. Open a `.yml` file in your editor
2. Click the **Lint** button in the [Command Panel](/app-help/documentation/code-ide/command-panel.md)
3. Review the changes in [Git Lite](/app-help/documentation/code-ide/left-panel/git-lite.md)
   * YAML syntax corrections
   * Formatting improvements
   * Structure updates
4. If satisfied with Lint updates, [Commit and Push](/app-help/documentation/code-ide/left-panel/git-lite.md#commit-and-push-your-changes) your changes to your remote branch

{% @arcade/embed flowId="mhDEXtnZo6K5nV53VADe" url="<https://app.arcade.software/share/mhDEXtnZo6K5nV53VADe>" %}

{% hint style="info" %}
Want to automate YAML formatting? Learn how to set up [Prettier pre-commit hooks](/app-help/documentation/integrations/code-ide/pre-commit/prettier-hooks.md) to automatically format YAML files before each commit.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paradime.io/app-help/documentation/code-ide/command-panel/code-quality.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
