-
Notifications
You must be signed in to change notification settings - Fork 111
feat(dblint): add pglinter #632
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
base: feat/dblint
Are you sure you want to change the base?
Conversation
ce64a8b to
322df77
Compare
- 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]>
juleswritescode
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet!
| # Verify installation | ||
| echo "Extension control files:" | ||
| ls -la "$(pg_config --sharedir)/extension/" | grep pglinter || echo "No pglinter found" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we fail early here? right now this would be cachted after creating extension plpgsql_check, if I'm not mistaken
| let mut runnable_rules = Vec::new(); | ||
| for rule_code in &enabled_rules { | ||
| if disabled_in_extension.contains(rule_code) { | ||
| results.push(PglinterDiagnostic::rule_disabled_in_extension(rule_code)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love it
adds support for
pglinterand integrate it withdblint. It reuses the existing infrastructure, and 99% of the code changes are generated.adapted the
Dockerfileto also installpglinter. 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.
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