Skip to content

tapdb: format SQL using SQLFluff #1616

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

tapdb: format SQL using SQLFluff #1616

wants to merge 5 commits into from

Conversation

guggero
Copy link
Member

@guggero guggero commented Jun 24, 2025

Uses SQLFluff to format and lint SQL migration and query files.

Inspired by #1612 (comment).

NOTE: This does change existing migration script files that have already run on most machines. But since the changes are only in the formatting, no actual schema changes are performed by this PR.

There are two new make goals:

  • make sql-lint: Run the linter as it runs in the CI to detect formatting issues in the SQL files in tapdb/sqlc/migrations/* tapdb/sqlc/queries/*
  • make sql-fix: Attempt to fix the linter issues in the SQL files in tapdb/sqlc/migrations/* tapdb/sqlc/queries/*

@coveralls
Copy link

coveralls commented Jun 24, 2025

Pull Request Test Coverage Report for Build 15853021857

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 67 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-0.06%) to 38.431%

Files with Coverage Reduction New Missed Lines %
commitment/tap.go 3 72.05%
asset/mock.go 5 65.59%
tapchannel/aux_leaf_signer.go 5 43.08%
tapdb/multiverse.go 6 53.03%
address/address.go 8 68.86%
address/mock.go 16 86.93%
asset/asset.go 24 45.21%
Totals Coverage Status
Change from base Build 15848785782: -0.06%
Covered Lines: 29195
Relevant Lines: 75967

💛 - Coveralls

Because the linter now forces us to always use lowercase function names,
we also need to do that to the (case sensitive!) postgres schema
replacement map.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

2 participants