Skip to content

Add make style targets for Ruby - #4026

Merged
kpumuk merged 1 commit into
apache:masterfrom
kpumuk:rb-style-targets
Oct 20, 2026
Merged

kpumuk merged 1 commit into
apache:masterfrom
kpumuk:rb-style-targets

Conversation

@kpumuk

@kpumuk kpumuk commented Oct 20, 2026

Copy link
Copy Markdown
Member

The Ruby Makefiles currently let make style finish without running RuboCop. Add style-local hooks in lib/rb, test/rb, and tutorial/rb that run safe autocorrection with rubocop -a. The test and tutorial targets use the shared library configuration; the tutorial uses the library bundle because it has no Gemfile.

This follows Jens's clarification in #3367:

The intention was to do "make style" where it already exists and where it gets added in the future.

With Autotools already configured and the Ruby bundles installed, for example:

$ cd test/rb
$ make style
cd . && bundle exec rubocop -a --config ../../lib/rb/.rubocop.yml
Inspecting 17 files
.................

17 files inspected, no offenses detected
  • Did you create an Apache Jira ticket? (Request account here, not required for trivial changes) — Not required for this small build-target addition.
  • If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"? — Not applicable.
  • 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, skip CI to free up build resources. — Not applicable: build rules changed.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 00:21
@mergeable mergeable Bot added ruby Pull requests that update Ruby code build and general CI cmake, automake and build system changes labels Oct 20, 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.

🟡 Changes recommended

The new recipes bypass the configured Bundler executable and fail when it is outside PATH.

1 open issue
What changed in this PR

Connects Ruby formatting to the existing make style workflow.

Changes:

  • Adds style-local hooks running RuboCop safe autocorrection.
  • Reuses the library configuration for tests and tutorials, and the library bundle for tutorials.
File Description
tutorial/​rb/​Makefile.am Runs tutorial formatting through the library bundle.
test/​rb/​Makefile.am Formats tests using the shared RuboCop configuration.
lib/​rb/​Makefile.am Adds library formatting with rubocop -a.

Review effort: Balanced

Comment thread lib/rb/Makefile.am Outdated
Client: rb

Run RuboCop safe autocorrection for the Ruby library, cross-language
tests, and tutorial through the existing Autotools style hooks.

Co-Authored-By: OpenAI Codex (gpt-6.1-sol) <codex@openai.com>
Copilot AI balanced review requested due to automatic review settings October 20, 2026 00:31

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.

🟢 Approval recommended

The three narrowly scoped hooks fit the existing style workflow, with no unresolved findings.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@kpumuk
kpumuk merged commit 327f358 into apache:master Oct 20, 2026
109 checks passed
@kpumuk
kpumuk deleted the rb-style-targets branch October 20, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build and general CI cmake, automake and build system changes ruby Pull requests that update Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants