Fix RuboCop 3 baseline offenses on main - #424
Merged
Merged
Conversation
Assisted-By: devx/2d33ac09-1dc1-4608-a505-946e99eed108
r0mdau
approved these changes
Jul 21, 2026
zcei
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Clean main currently has 8 RuboCop offenses that fail CI lint. This PR fixes all of them so that branches based on
mainstart 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
Style/MutableConstant— freeze mutable objects assigned to constants:lib/statsd/instrument/datagram.rb(PARSERregex)lib/statsd/instrument/dogstatsd_datagram.rb(PARSER,EVENT_PARSERregexes)lib/statsd/instrument/rubocop.rb(METRIC_METHODS,METAPROGRAMMING_METHODS,SINGLETON_CONFIGURATION_METHODS)lib/statsd/instrument/rubocop/metric_return_value.rb(INVALID_PARENTS)Lint/InterpolationCheck—test/rubocop/singleton_configuration_test.rbpasses literal interpolated source to the cop under test; annotated with a scopedrubocop:disable/enablesince the interpolation is intentional test input.Validation
bundle exec rubocop→ 79 files inspected, no offenses detected (was 8 offenses onmain).bundle exec rake test→ 390 runs, 1098 assertions, 0 failures, 0 errors.