-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[rb] Update lint configuration and fix rubocop offenses #17008
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
Conversation
User description💥 What does this PR do?Updates Ruby lint configuration and fixes rubocop offenses to reduce inline disable comments:
🔧 Implementation NotesThe goal is to reduce the number of inline rubocop disable comments by either:
💡 Additional ConsiderationsNone - all changes verified by pre-push hook running rubocop and steep. 🔄 Types of changes
PR TypeEnhancement Description
Diagram Walkthroughflowchart LR
A["Rubocop Offenses"] --> B["Add respond_to_missing?"]
A --> C["Rename Parameters"]
A --> D["Remove Duplicates"]
B --> E["Cleaner Code"]
C --> E
D --> E
F[".rubocop.yml"] --> G["Remove Exclusions"]
F --> H["Add Steepfile"]
F --> I["Add MixinUsage"]
G --> J["Reduced Config"]
H --> J
I --> J
|
| Relevant files | |||||||
|---|---|---|---|---|---|---|---|
| Enhancement |
| ||||||
| Cleanup |
| ||||||
| Configuration changes |
|
|
Thank you, @titusfortner for this code suggestion. The support packages contain example code that many users find helpful, but they do not necessarily represent After reviewing the change, unless it is a critical fix or a feature that is needed for Selenium We actively encourage people to add the wrapper and helper code that makes sense for them to their own frameworks. |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
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.
Pull request overview
Updates Ruby lint configuration and fixes RuboCop offenses with the goal of removing inline disable comments and aligning code with Ruby best practices around method_missing.
Changes:
- Moves/adjusts RuboCop exclusions in
rb/.rubocop.yml(includingSteepfileandStyle/MixinUsage) and removes now-unneeded inline disables. - Adds
respond_to_missing?implementations alongsidemethod_missingusage. - Cleans up specs by removing a duplicated example and parameter renames for readability.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| rb/spec/integration/selenium/webdriver/spec_helper.rb | Removes inline Style/MixinUsage disable and relies on config exclusion. |
| rb/spec/integration/selenium/webdriver/driver_spec.rb | Removes duplicated RSpec example and associated inline disable. |
| rb/lib/selenium/webdriver/support/event_firing_bridge.rb | Adds respond_to_missing? for method_missing delegation. |
| rb/lib/selenium/webdriver/support/color.rb | Renames from_hsl parameters to descriptive names. |
| rb/lib/selenium/webdriver/support/block_event_listener.rb | Adds respond_to_missing? for method_missing-based callback forwarding. |
| rb/Steepfile | Removes inline Metrics/BlockLength disable (moved to RuboCop config). |
| rb/.rubocop.yml | Updates metrics exclusions and adds Style/MixinUsage exclusion for the spec helper. |
7a5b06b to
78d5aea
Compare
💥 What does this PR do?
Updates Ruby lint configuration and fixes rubocop offenses to reduce inline disable comments:
.rubocop.ymlfor files that now pass lint checksSteepfiletoBlockLengthexclusion instead of inline disable commentrespond_to_missing?methods wheremethod_missingis used (best practice in Ruby)Color.from_hsldriver_spec.rbStyle/MixinUsageexclusion to.rubocop.yml🔧 Implementation Notes
The goal is to reduce the number of inline rubocop disable comments by either:
.rubocop.ymlwhere they're more visible💡 Additional Considerations
None - all changes verified by pre-push hook running rubocop and steep.
🔄 Types of changes