Skip to content

Conversation

@psteinroe
Copy link
Collaborator

@psteinroe psteinroe commented Dec 14, 2025

the actual changes are just within the codegen task. we now generate config and rule metadata from the sql too.

the flow is now:

  1. generate splinter rule metadata (rules/ directory) from splinter sql
  2. use a Visitor to collect rule metadata from the registry that loads the generated rule metadata when generating analyser code such as config and docs

This allows us to reuse all existing analyse infrastructure outside of the analyser / ast-linter.

@psteinroe psteinroe force-pushed the chore/integrate-splinter-into-codegen branch from f1f3eb0 to 67c3a79 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 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 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 marked this pull request as ready for review December 15, 2025 13:40
Copy link
Collaborator

@juleswritescode juleswritescode left a comment

Choose a reason for hiding this comment

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

very cool — the sql is just taken from SB, right?

@psteinroe
Copy link
Collaborator Author

very cool — the sql is just taken from SB, right?

yes!

Base automatically changed from refactor/rules to main December 16, 2025 17:04
@psteinroe psteinroe enabled auto-merge (squash) December 16, 2025 17:05
@psteinroe psteinroe merged commit cf54370 into main Dec 16, 2025
8 checks passed
@psteinroe psteinroe deleted the chore/integrate-splinter-into-codegen branch December 16, 2025 17:23
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