Skip to content

Commit

Permalink
Update lint-format.md (dbt-labs#3512)
Browse files Browse the repository at this point in the history
clarify that users need to be on code quality tab first

## What are you changing in this pull request and why?
<!---
Describe your changes and why you're making them. If linked to an open
issue or a pull request on dbt Core, then link to them here! 

To learn more about the writing conventions used in the dbt Labs docs,
see the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md).
-->

## Checklist
<!--
Uncomment if you're publishing docs for a prerelease version of dbt
(delete if not applicable):
- [ ] Add versioning components, as described in [Versioning
Docs](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-entire-pages)
- [ ] Add a note to the prerelease version [Migration
Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/guides/migration/versions)
-->
- [ ] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
- [ ] Add a checklist item for anything that needs to happen before this
PR is merged, such as "needs technical review" or "change base branch."

Adding new pages (delete if not applicable):
- [ ] Add page to `website/sidebars.js`
- [ ] Provide a unique filename for the new page

Removing or renaming existing pages (delete if not applicable):
- [ ] Remove page from `website/sidebars.js`
- [ ] Add an entry `website/static/_redirects`
- [ ] [Ran link
testing](https://github.com/dbt-labs/docs.getdbt.com#running-the-cypress-tests-locally)
to update the links that point to the deleted page
  • Loading branch information
mirnawong1 authored Jun 13, 2023
2 parents 2fa7a93 + d4f8ede commit c45cccc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions website/docs/docs/cloud/dbt-cloud-ide/lint-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ With the dbt Cloud IDE, you can seamlessly use [SQLFluff](https://sqlfluff.com/)

### Enable linting

1. To enable linting, make sure you've opened a `.sql` file.
1. To enable linting, make sure you open a `.sql` file and click the **Code Quality** tab.
2. Click on the **`</> Config`** button on the bottom right side of the [console section](/docs/cloud/dbt-cloud-ide/ide-user-interface#console-section), below the **File editor**.
3. In the code quality tool config pop up, you have the option to select **sqlfluff** or **sqlfmt**.
4. To lint your code, select the **sqlfluff** radio button. (Use sqlfmt to [format](#format) your code)
Expand Down Expand Up @@ -137,11 +137,13 @@ The Cloud IDE formatting integrations take care of manual tasks like code format

### Format SQL

To format your SQL code, dbt Cloud integrates with [sqlfmt](http://sqlfmt.com/), which is an uncompromising SQL query formatter that provides one way to format the SQL query and Jinja.
To format your SQL code, dbt Cloud integrates with [sqlfmt](http://sqlfmt.com/), which is an uncompromising SQL query formatter that provides one way to format the SQL query and Jinja.

By default, the IDE uses sqlfmt rules to format your code, making the **Format** button available and convenient to use right away. However, if you have a file named .sqlfluff in the root directory of your dbt project, the IDE will default to SQLFluff rules instead.

To enable formatting:

1. Make sure you open a `.sql` file.
1. Make sure you open a `.sql` file and click on the **Code Quality** tab.
2. Click on the **`</> Config`** button on the right side of the console.
3. In the code quality tool config pop-up, you have the option to select sqlfluff or sqlfmt.
4. To format your code, select the **sqlfmt** radio button. (Use sqlfluff to [lint](#linting) your code).
Expand Down

0 comments on commit c45cccc

Please sign in to comment.