Skip to content

Fix RuboCop 3 baseline offenses on main - #424

Merged
pedro-stanaka merged 1 commit into
mainfrom
pedro-stanaka/fix/rubocop-3-offenses
Jul 21, 2026
Merged

Fix RuboCop 3 baseline offenses on main#424
pedro-stanaka merged 1 commit into
mainfrom
pedro-stanaka/fix/rubocop-3-offenses

Conversation

@pedro-stanaka

Copy link
Copy Markdown
Contributor

Summary

Clean main currently has 8 RuboCop offenses that fail CI lint. This PR fixes all of them so that branches based on main start from a clean RuboCop baseline.

These fixes are unrelated to the positional aggregator work in #423 and are split out here so that PR can stay focused.

Offenses fixed

  • 7 × Style/MutableConstant — freeze mutable objects assigned to constants:
    • lib/statsd/instrument/datagram.rb (PARSER regex)
    • lib/statsd/instrument/dogstatsd_datagram.rb (PARSER, EVENT_PARSER regexes)
    • lib/statsd/instrument/rubocop.rb (METRIC_METHODS, METAPROGRAMMING_METHODS, SINGLETON_CONFIGURATION_METHODS)
    • lib/statsd/instrument/rubocop/metric_return_value.rb (INVALID_PARENTS)
  • 1 × Lint/InterpolationChecktest/rubocop/singleton_configuration_test.rb passes literal interpolated source to the cop under test; annotated with a scoped rubocop:disable/enable since the interpolation is intentional test input.

Validation

  • bundle exec rubocop → 79 files inspected, no offenses detected (was 8 offenses on main).
  • bundle exec rake test → 390 runs, 1098 assertions, 0 failures, 0 errors.

Assisted-By: devx/2d33ac09-1dc1-4608-a505-946e99eed108
@pedro-stanaka
pedro-stanaka merged commit 84d4f5d into main Jul 21, 2026
11 checks passed
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.

3 participants