-
Notifications
You must be signed in to change notification settings - Fork 109
fix: clippy issues #622
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
Merged
Merged
fix: clippy issues #622
+7
−23
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2b05d65 to
8cff804
Compare
4954d25 to
0ce0a74
Compare
8cff804 to
ee9755d
Compare
0ce0a74 to
1a86bd0
Compare
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 <[email protected]>
1a86bd0 to
6d4879b
Compare
ee9755d to
6997db0
Compare
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 <[email protected]>
Fixed import ordering and line length formatting issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
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 <[email protected]>
6997db0 to
2162888
Compare
6d4879b to
0b16c5a
Compare
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 <[email protected]>
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 <[email protected]>
Fixed stale module reference after rebase. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
- 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 <[email protected]>
Apply automatic clippy fixes for format! macro usage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
2162888 to
e86fa47
Compare
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Instead of re-parsing SQL comment metadata in docs codegen, expose structured metadata directly through the registry API. Changes: - Add SplinterRuleMetadata struct (description, remediation, requires_supabase) - Add get_rule_metadata() function to registry - Update docs codegen to use structured metadata - Remove duplicate SQL parsing logic - Update runtime to use new metadata API - Deprecate rule_requires_supabase() in favor of get_rule_metadata() This eliminates redundant parsing and provides a cleaner API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
566f62d to
f78e00e
Compare
Changed the architecture to make metadata accessible as trait constants instead of requiring registry lookups or SQL parsing: - Updated `SplinterRule` trait to include four associated constants: - `SQL_FILE_PATH`: Path to SQL file (changed from function to const) - `DESCRIPTION`: What the rule detects - `REMEDIATION`: URL to documentation - `REQUIRES_SUPABASE`: Whether rule needs Supabase roles - Updated codegen to generate these constants in each rule's impl block - Updated registry to provide metadata via qualified trait syntax: - `get_rule_metadata_fields()`: Returns tuple by calling trait constants - `get_rule_metadata()`: Returns struct by delegating to above - Updated docs codegen to use `get_rule_metadata_fields()` from registry Benefits: - Type-safe: Metadata defined with the rule type - No runtime string parsing - Single source of truth (SQL metadata comments) - Clean API: Registry provides runtime lookups via trait constants 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
f78e00e to
322d934
Compare
The combined SQL files (splinter.sql, splinter_generic.sql, splinter_supabase.sql) are no longer used by the runtime. The new system reads individual SQL files from vendor/performance/ and vendor/security/ directories. Changes: - Remove obsolete combined SQL files - Remove build.rs that generated the combined files - Remove ureq build dependency The individual rule SQL files in vendor/ subdirectories are maintained manually and embedded at compile time via include_str! in the registry.
322d934 to
1cabfe8
Compare
1cabfe8 to
98a1b94
Compare
juleswritescode
approved these changes
Dec 16, 2025
98a1b94 to
3237c98
Compare
Removed confusing type aliases that created two names for the same types:
- Rule → LinterRule
- RuleContext → LinterRuleContext
- RuleDiagnostic → LinterDiagnostic
Updated all 34 rule files and the codegen template to use the full type names
for better clarity and consistency. The aliases made the API confusing by having
two names for the same type (e.g., "is RuleDiagnostic different from
LinterDiagnostic?").
All rule implementations now consistently use:
- use crate::{LinterRule, LinterRuleContext, LinterDiagnostic};
- impl LinterRule for RuleName { ... }
022ad92 to
08d9b38
Compare
- Remove unused get_fully_qualified_name method - Combine duplicate if blocks with identical code using || operator Fixes clippy warnings: - dead_code: method get_fully_qualified_name is never used - if_same_then_else: identical blocks in if/else chain
8206eef to
4bbff26
Compare
Base automatically changed from
chore/integrate-splinter-docs-codegen
to
chore/integrate-splinter-runtime
December 16, 2025 17:14
juleswritescode
approved these changes
Dec 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes minor clippy issues from previous prs