Skip to content

Rust stub: crank clippy linter to pedantic#703

Open
robsdedude wants to merge 2 commits into6.xfrom
rust-stub/clippy-pedantic
Open

Rust stub: crank clippy linter to pedantic#703
robsdedude wants to merge 2 commits into6.xfrom
rust-stub/clippy-pedantic

Conversation

@robsdedude
Copy link
Member

@robsdedude robsdedude commented Feb 5, 2026

Closes: DRIVERS-256

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables the clippy::pedantic linter level for the Rust codebase and addresses all resulting warnings through a combination of refactoring, simplifications, and properly documented allow attributes.

Changes:

  • Enabled clippy::pedantic and clippy::allow_attributes_without_reason in main.rs
  • Extracted large validator functions into a new jolt_validators module to reduce complexity
  • Refactored WebSocket stream state machine by extracting enum variants into separate structs
  • Extracted large methods in net_actor.rs into smaller, focused functions
  • Added reason parameters to all #[allow(...)] attributes throughout the codebase
  • Applied clippy suggestions (simplified matches, if-let-else, map_or, etc.)
  • Made visibility changes to support the new module structure

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated no comments.

Show a summary per file
File Description
boltstub_rs/src/main.rs Enabled pedantic clippy lints with allow for match_same_arms
boltstub_rs/src/parser.rs Major refactoring: extracted functions and moved validators to new module
boltstub_rs/src/parser/jolt_validators.rs New module containing validation logic extracted from parser.rs
boltstub_rs/src/web_socket_stream.rs Refactored state machine enums into separate structs with extracted methods
boltstub_rs/src/values/pack_stream_value.rs Added allow reasons and applied clippy simplifications
boltstub_rs/src/net_actor.rs Extracted large methods into focused helper functions
boltstub_rs/src/bolt_version.rs Changed message_auto_response return type from Option<Resolvable> to Resolvable
boltstub_rs/src/values/bolt_struct/*.rs Various clippy fixes and test code cleanup
boltstub_rs/src/net*.rs Simplified conditionals and added allow reasons
Multiple other files Minor clippy fixes, allow reasons, and simplifications

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@robsdedude robsdedude marked this pull request as ready for review February 5, 2026 12:42
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