Open
Conversation
hdonnay
commented
Mar 19, 2026
| return nil | ||
| } | ||
|
|
||
| //go:generate find . -name *.sql -exec go run github.com/wasilibs/go-sql-formatter/v15/cmd/sql-formatter@latest --language postgresql --fix {} ; |
Member
Author
There was a problem hiding this comment.
This is the only "real" change, everything else is whitespace changes as a result of running go generate.
This change adds a `generate` directive that runs an SQL formatter via `go run`. It also runs the formatter over the existing SQL. See-also: https://issues.redhat.com/browse/CLAIRDEV-85 Change-Id: I7ae14f596154b6f9bec66800c388bfe5ce732ca4 Signed-off-by: Hank Donnay <hdonnay@redhat.com>
7172a7e to
a3c8df5
Compare
dcaravel
approved these changes
Mar 24, 2026
dcaravel
left a comment
There was a problem hiding this comment.
LGTM - can't say I agree with all the formatting decisions made by the lib, but that's a me problem ;)
| return nil | ||
| } | ||
|
|
||
| //go:generate find . -name *.sql -exec go run github.com/wasilibs/go-sql-formatter/v15/cmd/sql-formatter@latest --language postgresql --fix {} ; |
There was a problem hiding this comment.
For consideration - is it worth referencing a specific tag vs. latest here? Thinking of risk if repo is compromised, a tag + sumdb may help detect.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change adds a
generatedirective that runs an SQL formatter viago run. It also runs the formatter over the existing SQL.