Skip to content

Conversation

@psteinroe
Copy link
Collaborator

@psteinroe psteinroe commented Dec 15, 2025

  • wires up the actual execution of splinter with existing AnalysisFilter to dynamically build the query by combining the parts with UNION ALL.
  • we skip the rules that are supbase-only if the target database isnt supabase
  • prepares docs integration by embedding metadata, configuration and the actual sql in the RuleMeta comment.

@psteinroe psteinroe marked this pull request as draft December 15, 2025 09:24
@psteinroe psteinroe changed the title chore: integrate splinter runtime chore(splinter): integrate runtime Dec 15, 2025
@psteinroe psteinroe force-pushed the chore/integrate-splinter-runtime branch from 9612b64 to 9f4643c Compare December 15, 2025 10:16
@psteinroe psteinroe force-pushed the chore/integrate-splinter-into-codegen branch from f1f3eb0 to 67c3a79 Compare December 15, 2025 10:53
@psteinroe psteinroe force-pushed the chore/integrate-splinter-runtime branch from 9f4643c to 75f57f2 Compare December 15, 2025 10:53
Changed pgls_analyse::AnalyserRules to pgls_analyser::LinterRules
and fixed import statements to use the correct crate for RuleOptions.

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

Co-Authored-By: Claude <noreply@anthropic.com>
@psteinroe psteinroe force-pushed the chore/integrate-splinter-into-codegen branch from 67c3a79 to d6a616c Compare December 15, 2025 11:08
@psteinroe psteinroe force-pushed the chore/integrate-splinter-runtime branch from 75f57f2 to c9e5c4d Compare December 15, 2025 11:08
psteinroe and others added 5 commits December 15, 2025 12:32
Updated test files to use the new type names after the refactor:
- Changed AnalyserOptions to LinterOptions
- Changed RuleDiagnostic to LinterDiagnostic
- Fixed import paths to import from pgls_analyser instead of pgls_analyse

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

Co-Authored-By: Claude <noreply@anthropic.com>
Fixed import ordering and line length formatting issues.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Picked up test import fixes from base branch and applied codegen updates.

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

Co-Authored-By: Claude <noreply@anthropic.com>
@psteinroe psteinroe force-pushed the chore/integrate-splinter-into-codegen branch from d6a616c to 0379759 Compare December 15, 2025 12:34
@psteinroe psteinroe force-pushed the chore/integrate-splinter-runtime branch from c9e5c4d to 6d06773 Compare December 15, 2025 12:37
psteinroe and others added 3 commits December 15, 2025 13:53
Changed SQL file path generation to use relative paths from crate root
instead of absolute paths, fixing CI codegen check failures.

Also removed unused splinter/unknown category from TypeScript types.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Removed unused `use pgls_analyse::RuleMeta;` import from generated
splinter rule files and applied clippy format! macro fix.

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

Co-Authored-By: Claude <noreply@anthropic.com>
@psteinroe psteinroe force-pushed the chore/integrate-splinter-runtime branch from 6d06773 to f1d2862 Compare December 15, 2025 13:32
@psteinroe psteinroe force-pushed the chore/integrate-splinter-runtime branch from f1d2862 to a61dce9 Compare December 15, 2025 13:45
psteinroe and others added 3 commits December 15, 2025 14:51
Fixed stale module reference after rebase.

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

Co-Authored-By: Claude <noreply@anthropic.com>
@psteinroe psteinroe force-pushed the chore/integrate-splinter-runtime branch from a61dce9 to 13afe90 Compare December 15, 2025 13:59
psteinroe and others added 6 commits December 15, 2025 15:49
Remove unnecessary SELECT * FROM wrapping that was causing syntax errors
with CTEs. SQL files are already complete parenthesized queries.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Some SQL files are already wrapped in parentheses while others are not.
Ensure consistent wrapping to create valid UNION ALL syntax.

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

Co-Authored-By: Claude <noreply@anthropic.com>
SQL files use "name!" notation for column names (literal identifiers),
so FromRow must look for these exact names. Also fix clippy warnings.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Individual SQL queries' ORDER BY clauses are not preserved when combined
with UNION ALL. Wrap the entire result in SELECT and ORDER BY cache_key!
to ensure consistent, deterministic ordering for tests.

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove backslash escaping from backticks in message text
- Update diagnostic ordering to match cache_key sort order

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

Co-Authored-By: Claude <noreply@anthropic.com>
Apply automatic clippy fixes for format! macro usage

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

Co-Authored-By: Claude <noreply@anthropic.com>
@psteinroe psteinroe marked this pull request as ready for review December 15, 2025 16:24
///
/// ## Remediation
///
/// See: <{remediation}>"#,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

die remediation ist jetzt quasi eine remediationUrl, wir könnten auch die metadata zu "See " ändern?

wires up splinter with the docs codegen. we collect the metadata using
`RuleVisitor` and print them out to markdown. This is the same approach
we use with the rules from `analyser` (to be renamed to `linter`). Added
the additional metadata to `SplinterRule`.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Base automatically changed from chore/integrate-splinter-into-codegen to main December 16, 2025 17:23
@psteinroe psteinroe enabled auto-merge (squash) December 16, 2025 17:28
@psteinroe psteinroe merged commit 813624a into main Dec 16, 2025
8 checks passed
@psteinroe psteinroe deleted the chore/integrate-splinter-runtime branch December 16, 2025 17:37
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.

3 participants