Fix PL/pgSQL formatting indentation #2

Merged
warkanum merged 1 commits from issue-1-formatting-indenting into main 2026-07-16 19:38:55 +00:00
Member

Summary

  • Align standalone PL/pgSQL THEN with its IF/ELSIF line when THEN is on its own line.
  • Realign top-level UPDATE/DELETE SET/WHERE/AND/OR lines inside PL/pgSQL blocks while preserving nested subquery indentation.
  • Add regression coverage for issue #1 and update affected corpus golden output.

Verification

  • go test ./pkg/format -run TestFormatIssue1PLpgSQLIndenting -count=1
  • go test ./pkg/format -count=1
  • go test ./pkg/lsp -run TestFormatting -count=1 -v
  • go test ./... (passed once after retrying transient pkg/lsp TestFormatting timeout)
  • go build ./cmd/pgtidy
  • go vet ./...

Closes #1

## Summary - Align standalone PL/pgSQL THEN with its IF/ELSIF line when THEN is on its own line. - Realign top-level UPDATE/DELETE SET/WHERE/AND/OR lines inside PL/pgSQL blocks while preserving nested subquery indentation. - Add regression coverage for issue #1 and update affected corpus golden output. ## Verification - go test ./pkg/format -run TestFormatIssue1PLpgSQLIndenting -count=1 - go test ./pkg/format -count=1 - go test ./pkg/lsp -run TestFormatting -count=1 -v - go test ./... (passed once after retrying transient pkg/lsp TestFormatting timeout) - go build ./cmd/pgtidy - go vet ./... Closes #1
sgcommand added 1 commit 2026-07-15 19:49:58 +00:00
fix: align PLpgSQL formatting clauses
CI / Test (pull_request) Successful in 43s
CI / Build (pull_request) Successful in 1m2s
5cba6beeb1
warkanum merged commit 8d19258aa0 into main 2026-07-16 19:38:55 +00:00
warkanum deleted branch issue-1-formatting-indenting 2026-07-16 19:39:00 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wdevs/PgTidy#2