sqlfmt icon indicating copy to clipboard operation
sqlfmt copied to clipboard

sqlfmt formats your dbt SQL files so you don't have to

Results 91 sqlfmt issues
Sort by recently updated
recently updated
newest added

Should include two examples: 1. Simple check workflow 2. Format-and-commit workflow Also consider packaging this as an Action.

documentation

#98 should have been caught in CI, but wasn't, since our test env also installs black by default. Poetry's next release will support dependency groups, which we can use to...

refactor

`create`, `insert`, `grant`, etc., should raise a warning if parsed and we shouldn't try to format those queries. Should get added to a "skipped" count in the report Or probably...

enhancement

we can follow's click's defaults here, just have to turn them on and add some testing. https://click.palletsprojects.com/en/8.1.x/options/#values-from-environment-variables

enhancement

The opinion of some formatters for other languages - https://prettier.io/docs/en/rationale.html#empty-lines - https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#empty-lines Both leave empty lines from original format, but collapse them to a standard number of lines (ie. 0...

enhancement

rc1 out now. Official release expected in October

enhancement

A lot of logic can be simplified if we don't create nodes for newline tokens; a Line will always have exactly one newline, and tracking them as nodes is redundant...

refactor

**Describe the bug** BigQuery uses angle brackets for type declarations. We treat it like `lt` `gt`, with extra whitespace (and worst-case, line breaks like operators) **To Reproduce** ```sql SELECT ARRAY[1,...

bug

when primer fails in CI, we should automatically open a PR in the target repo with the changes from the latest sqlfmt commit

enhancement

**Description** In the scenario where a jinja block is enclosed in single quotes, and contains single quotes, a space is added inside the single quotes which causes an error. Perhaps...

bug