Skip to content

ci: Fix malformed rubocop disable directive - #439

Merged
kinyoklion merged 1 commit into
mainfrom
devin/1789421265-fix-rubocop-directive
Sep 14, 2026
Merged

kinyoklion merged 1 commit into
mainfrom
devin/1789421265-fix-rubocop-directive

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Sep 14, 2026

Copy link
Copy Markdown
Member

Drops a stray trailing colon from a # rubocop:disable directive that RuboCop 1.91.0 now rejects, breaking Publish Package / build-ruby-gem.

  • Only change is Naming/MethodName: -> Naming/MethodName in flag_builder.rb
  • No behavior change; the directive was previously a no-op comment as far as RuboCop was concerned
Implementation details

Root cause

build-ruby-gem failed in the Run RuboCop step of ./.github/actions/check:

lib/ldclient-rb/integrations/test_data/flag_builder.rb:490:108: W: Lint/CopDirectiveSyntax:
Malformed directive comment detected. Cop names must be separated by commas.
Comment in the directive must start with --.

Lint/CopDirectiveSyntax was added in RuboCop 1.72 as a pending cop and this repo sets NewCops: disable, so it stayed off. In RuboCop 1.91.0 (VersionChanged: '1.91' in the gem's config/default.yml) it is enabled by default, so the pre-existing malformed directive started failing. The gemspec allows rubocop "~> 1.76", so CI picked up 1.91.0 as soon as it released — nothing changed in the SDK source.

Testing

bundle exec rubocop equivalent run locally with rubocop 1.91.0 + rubocop-performance 1.27.0: 1 offense before the change, 186 files inspected, no offenses detected after.

Alternatives considered

Pinning RuboCop below 1.91 in the gemspec would also unblock CI, but the directive is genuinely malformed (the disable never applied), so fixing it is the correct minimal change.

Link to Devin session: https://app.devin.ai/sessions/700251d712274fcfaabc41ae8e479b3f
Open in Devin Desktop: https://app.devin.ai/desktop/session/700251d712274fcfaabc41ae8e479b3f?variant=devin
Requested by: @kinyoklion


Note

Overview
Fixes Publish Package / build-ruby-gem RuboCop failures introduced by RuboCop 1.91.0 by correcting a malformed # rubocop:disable comment on FlagRuleClause in flag_builder.rb.

The directive had a stray trailing colon (Naming/MethodName:); Lint/CopDirectiveSyntax now rejects that syntax. The change drops the colon so the disable applies as intended. No runtime or API behavior changes.

Reviewed by Cursor Bugbot for commit 4b883a8. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@kinyoklion
kinyoklion marked this pull request as ready for review September 14, 2026 21:28
@kinyoklion
kinyoklion requested a review from a team as a code owner September 14, 2026 21:28
@kinyoklion
kinyoklion merged commit 0caaa99 into main Sep 14, 2026
12 checks passed
@kinyoklion
kinyoklion deleted the devin/1789421265-fix-rubocop-directive branch September 14, 2026 21:37
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