Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change SQL fomatting tool to pgformatter #477

Merged
merged 2 commits into from
Nov 21, 2024
Merged

Conversation

andrew-farries
Copy link
Collaborator

@andrew-farries andrew-farries commented Nov 21, 2024

Change the SQL formatting tool used by make format from sql-formatter to pgFormatter.

Stop using sql-formatter because it doesn't work on the read_schema function:

npx sql-formatter -l postgresql --fix pkg/state/init.sql

doesn't change the file regardless of whatever changes are made to read_schema.

pgFormatter produces consistent formatting on the read_schema function so let's use that.

I'm not convinced that either formatting tool gave us formatting that was better than what we were doing by hand before. It's a question of consistency vs personal preference.

@andrew-farries andrew-farries force-pushed the change-sql-formatter branch 2 times, most recently from bacb3c6 to aa523cd Compare November 21, 2024 09:41
@ryanslade
Copy link
Contributor

Agree, it's more about consistency

@andrew-farries andrew-farries marked this pull request as ready for review November 21, 2024 09:47
Base automatically changed from fix-read-schema-for-multi-column-fks to main November 21, 2024 09:50
@andrew-farries andrew-farries merged commit 0a282a2 into main Nov 21, 2024
27 checks passed
@andrew-farries andrew-farries deleted the change-sql-formatter branch November 21, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants