Skip to content

Commit cfc518a

Browse files
committed
Revert RuboCop breaking changes
1 parent 842c8db commit cfc518a

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

.rubocop_todo.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2025-07-25 20:10:38 UTC using RuboCop version 1.79.0.
3+
# on 2025-07-25 20:21:46 UTC using RuboCop version 1.79.0.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9+
# Offense count: 6
10+
# This cop supports safe autocorrection (--autocorrect).
11+
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
12+
# SupportedStylesForExponentOperator: space, no_space
13+
# SupportedStylesForRationalLiterals: space, no_space
14+
Layout/SpaceAroundOperators:
15+
Exclude:
16+
- 'test/formatters/default_test.rb'
17+
918
# Offense count: 1
1019
# Configuration parameters: AllowedMethods.
1120
# AllowedMethods: enums
@@ -24,6 +33,12 @@ Lint/LiteralAssignmentInCondition:
2433
Exclude:
2534
- 'lib/semantic_logger/loggable.rb'
2635

36+
# Offense count: 2
37+
# This cop supports safe autocorrection (--autocorrect).
38+
Lint/LiteralInInterpolation:
39+
Exclude:
40+
- 'test/formatters/default_test.rb'
41+
2742
# Offense count: 25
2843
Lint/RescueException:
2944
Enabled: false
@@ -113,6 +128,15 @@ Style/DocumentDynamicEvalDefinition:
113128
- 'lib/semantic_logger/loggable.rb'
114129
- 'test/appender/wrapper_test.rb'
115130

131+
# Offense count: 6
132+
# This cop supports safe autocorrection (--autocorrect).
133+
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
134+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
135+
# SupportedShorthandSyntax: always, never, either, consistent, either_consistent
136+
Style/HashSyntax:
137+
Exclude:
138+
- 'test/formatters/default_test.rb'
139+
116140
# Offense count: 2
117141
# This cop supports unsafe autocorrection (--autocorrect-all).
118142
Style/IdenticalConditionalBranches:

test/formatters/default_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class DefaultTest < Minitest::Test
146146
describe "payload" do
147147
it "logs hash payload" do
148148
log.payload = {first: 1, second: 2, third: 3}
149-
assert_equal "-- {:first=>1, :second=>2, :third=>3}", formatter.payload
149+
assert_equal "-- #{{:first=>1, :second=>2, :third=>3}}", formatter.payload
150150
end
151151

152152
it "skips nil payload" do
@@ -184,7 +184,7 @@ class DefaultTest < Minitest::Test
184184
log.backtrace = backtrace
185185
set_exception
186186
duration = SemanticLogger::Formatters::Base::PRECISION == 3 ? "1" : "1.346"
187-
str = "#{expected_time} D [#{$$}:#{Thread.current.name} default_test.rb:99] [first] [second] [third] {first: 1, second: 2, third: 3} (#{duration}ms) DefaultTest -- Hello World -- {:first=>1, :second=>2, :third=>3} -- Exception: RuntimeError: Oh no\n"
187+
str = "#{expected_time} D [#{$$}:#{Thread.current.name} default_test.rb:99] [first] [second] [third] {first: 1, second: 2, third: 3} (#{duration}ms) DefaultTest -- Hello World -- #{{:first=>1, :second=>2, :third=>3}} -- Exception: RuntimeError: Oh no\n"
188188
assert_equal str, formatter.call(log, nil).lines.first
189189
end
190190
end

0 commit comments

Comments
 (0)