You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To Reproduce
Start with a simple file with a config block definition, such as config_block.txt, and make a minor change. Run the formatter and then make another minor change and run the formatter again. You should see the indentation of the config variables increasing each time (4 more spaces).
Expected behavior
The formatter should produce a stable result.
Actual behavior
The formatter is unstable because it keeps indenting the config variables.
Additional context
sqlfmt, version 0.9.0
The text was updated successfully, but these errors were encountered:
Did you install sqlfmt with the jinjafmt extra? (pip install sqlfmt[jinjafmt]) and/or do you otherwise have black installed?
Does this still happen if you run sqlfmt with the --no-jinjafmt option? e.g., sqlfmt --no-jinjafmt myfile.sql?
Rather than making small changes to your file, can you reproduce if you pass the -k option to sqlfmt? This clears the cache and forces reformatting, even if the source file is unchanged. sqlfmt -k myfile.sql
Are you sure you're running 0.9.0? This was absolutely a bug in a previous release. You may have multiple versions installed? I would run which sqlfmt and sqlfmt --version to make sure that it's 0.9.0 that is producing this result
Sorry, this was an issue with the version specified in my pre-commit hook (forgot that pre-commit had it's own config and it was using v0.5.1). Realized this after just using the sqlfmt command directly.
Thanks for the quick response and for providing the different commands that will be helpful to my team in the future. Keep up the great work!
Describe the bug
The formatter is unstable with dbt config blocks.
Likely related to #175 but not sure.
To Reproduce
Start with a simple file with a config block definition, such as config_block.txt, and make a minor change. Run the formatter and then make another minor change and run the formatter again. You should see the indentation of the config variables increasing each time (4 more spaces).
Expected behavior
The formatter should produce a stable result.
Actual behavior
The formatter is unstable because it keeps indenting the config variables.
Additional context
sqlfmt, version 0.9.0
The text was updated successfully, but these errors were encountered: