Skip to content

Conversation

@psteinroe
Copy link
Collaborator

@psteinroe psteinroe commented Dec 29, 2025

adds support for pglinter and integrate it with dblint. It reuses the existing infrastructure, and 99% of the code changes are generated.

adapted the Dockerfile to also install pglinter. Will take around 10 minutes now to build, but its all cached after that.

the initial metadata is generated from the downloaded repo. a follow-up pr will automate this too.

pglinter works in a weird way where the user defines thresholds for certain rules. e.g.

---
source: crates/pgls_pglinter/tests/diagnostics.rs
expression: content
snapshot_kind: text
---
Category: pglinter/base/howManyObjectsWithUppercase
Severity: Warning
Message: Count number of objects with uppercase in name or in columns.
Advices:
Count number of objects with uppercase in name or in columns.
[Info] Rule: B005
How to fix:
[Info]   1. Do not use uppercase for any database objects

I would much rather see the actual objects that have an uppercase in name...

Opened an issue to check in with the maintainer: pmpetit/pglinter#83

@psteinroe psteinroe marked this pull request as draft December 29, 2025 12:49
@psteinroe psteinroe changed the title feat(dblint): add splinter feat(dblint): add pglinter Dec 29, 2025
psteinroe and others added 4 commits December 29, 2025 16:18
- Add #![cfg(not(target_os = "windows"))] to skip pglinter tests on Windows
  since the pglinter extension is not available there (only Linux/macOS)
- Fix clippy warnings: use as_deref() and contains() instead of manual patterns
- Remove table_with_primary_key test since pglinter checks all tables globally,
  making a "no diagnostics for table with PK" test impossible when other tables exist
- Add plpgsql_check as dependency in test setup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@psteinroe psteinroe marked this pull request as ready for review December 30, 2025 10:26
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