Skip to content

Enable additional RuboCop spacing rules - #3723

Merged
kpumuk merged 1 commit into
apache:masterfrom
kpumuk:rb-rubocop-spacing
Aug 16, 2026
Merged

Enable additional RuboCop spacing rules#3723
kpumuk merged 1 commit into
apache:masterfrom
kpumuk:rb-rubocop-spacing

Conversation

@kpumuk

@kpumuk kpumuk commented Aug 16, 2026

Copy link
Copy Markdown
Member

Enable the remaining neutral RuboCop spacing rules for operators, separators, comments, lambdas, and delimiters, then apply their autocorrections across the Ruby library, benchmarks, specs, and integration tests.

This intentionally leaves interior array and hash spacing unenforced, preserving forms such as [1, 2, 3] and {a: 5, b: 6} without creating avoidable churn.

This follows the merged Style/UnpackFirst PR #3722; its diff contains only this spacing layer.

  • Did you create an Apache Jira ticket? (Request account here, not required for trivial changes)
  • If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
  • Did you squash your changes to a single commit? (not required, but preferred)
  • Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"?
  • If your change does not involve any code, include [skip ci] anywhere in the commit message to free up build resources.

Client: rb

Co-Authored-By: OpenAI Codex (GPT-5.6) <codex@openai.com>
Copilot AI lite review requested due to automatic review settings August 16, 2026 18:55
@mergeable mergeable Bot added the ruby Pull requests that update Ruby code label Aug 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Enables additional neutral RuboCop layout/spacing cops for the Ruby subtree and applies the corresponding auto-corrections across the Ruby library, benchmarks, specs, and integration tests.

Changes:

  • Turn on a set of Layout/Space* RuboCop rules in lib/rb/.rubocop.yml.
  • Apply spacing fixes around operators, delimiters, and separators across Ruby implementation and test/benchmark code.
  • Normalize numeric/range/operator spacing in protocol specs and JSON protocol implementation.

Reviewed changes

Copilot reviewed 1 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/rb/integration/TestClient.rb Adjusts assertion spacing in integration tests.
lib/rb/spec/json_protocol_spec.rb Normalizes float division spacing in JSON protocol specs.
lib/rb/spec/compact_protocol_spec.rb Normalizes float division spacing in compact protocol specs.
lib/rb/spec/binary_protocol_spec_shared.rb Normalizes exponent/range-related operator spacing in shared binary protocol specs.
lib/rb/lib/thrift/transport/memory_buffer_transport.rb Normalizes constant expression spacing.
lib/rb/lib/thrift/protocol/json_protocol.rb Normalizes range and float division spacing in JSON protocol implementation.
lib/rb/lib/thrift/processor.rb Normalizes string concatenation spacing in error construction.
lib/rb/benchmark/thin_server.rb Normalizes indexing expression spacing.
lib/rb/benchmark/server.rb Normalizes indexing expression spacing.
lib/rb/benchmark/benchmark.rb Normalizes interpolation/concatenation spacing in formatting code.
lib/rb/.rubocop.yml Enables additional RuboCop layout/spacing cops.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/rb/integration/TestClient.rb
@kpumuk
kpumuk merged commit 94f78a1 into apache:master Aug 16, 2026
94 of 95 checks passed
@kpumuk
kpumuk deleted the rb-rubocop-spacing branch August 16, 2026 19:30
@kpumuk kpumuk mentioned this pull request Aug 16, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ruby Pull requests that update Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants