-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[rb] Add rubocop binary target for flexible linting #17006
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
base: trunk
Are you sure you want to change the base?
Conversation
User description💥 What does this PR do?Adds a flexible 🔧 Implementation Notes
💡 Additional ConsiderationsThis matches the pattern I've been using with ruff and format 🔄 Types of changes
PR TypeEnhancement Description
Diagram Walkthroughflowchart LR
A["rb/BUILD.bazel"] -->|adds| B["rubocop binary target"]
A -->|removes| C["lint-unsafe target"]
B -->|accepts| D["custom rubocop flags"]
C -->|replaced by| B
|
| Relevant files | |||
|---|---|---|---|
| Enhancement |
|
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
This PR adds a flexible //rb:rubocop binary target that allows passing arbitrary rubocop flags via --, and removes the now-redundant //rb:lint-unsafe target. This provides better flexibility for running rubocop with custom options while maintaining the existing //rb:lint test target unchanged.
Changes:
- Added
//rb:rubocopbinary target that accepts arbitrary rubocop flags - Removed
//rb:lint-unsafebinary target (no longer needed)
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
💥 What does this PR do?
Adds a flexible
//rb:rubocopbinary target that accepts any rubocop flags,and removes the now-redundant
//rb:lint-unsafetarget.🔧 Implementation Notes
//rb:rubocopincludes only the config and file paths, letting you pass any flags via--bazel run //rb:rubocop -- --autocorrect-all(replaces//rb:lint-unsafe)bazel run //rb:rubocop -- --only Metrics/AbcSizebazel run //rb:rubocop -- --auto-gen-config//rb:lintunchanged - still runs as a test with--autocorrect💡 Additional Considerations
This matches the pattern I've been using with ruff and format
🔄 Types of changes