AutoFix RuboCop Style/TrailingCommaInHashLiteral

This commit is contained in:
Pieter Oliver 2025-07-08 17:14:26 +01:00
parent abcef47505
commit 78f7ba0e64
No known key found for this signature in database
GPG key ID: AAC5BA1478582D1F
3 changed files with 7 additions and 16 deletions

View file

@ -307,15 +307,6 @@ Style/SymbolProc:
Exclude: Exclude:
- 'lib/grape_logging/util/parameter_filter.rb' - 'lib/grape_logging/util/parameter_filter.rb'
# Offense count: 7
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
Style/TrailingCommaInHashLiteral:
Exclude:
- 'spec/lib/grape_logging/loggers/filter_parameters_spec.rb'
- 'spec/lib/grape_logging/loggers/response_spec.rb'
# Offense count: 10 # Offense count: 10
# This cop supports safe autocorrection (--autocorrect). # This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings. # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.

View file

@ -11,7 +11,7 @@ describe GrapeLogging::Loggers::FilterParameters do
'two' => 'two', 'two' => 'two',
'three' => 'three', 'three' => 'three',
'four' => 'four', 'four' => 'four',
"\xff" => 'invalid utf8', "\xff" => 'invalid utf8'
}) })
end end
@ -40,7 +40,7 @@ describe GrapeLogging::Loggers::FilterParameters do
'two' => 'two', 'two' => 'two',
'three' => 'three', 'three' => 'three',
'four' => subject.instance_variable_get('@replacement'), 'four' => subject.instance_variable_get('@replacement'),
"\xff" => 'invalid utf8', "\xff" => 'invalid utf8'
}) })
end end
@ -62,9 +62,9 @@ describe GrapeLogging::Loggers::FilterParameters do
'six' => { 'six' => {
'seven' => 'seven', 'seven' => 'seven',
'eight' => 'eight', 'eight' => 'eight',
'one' => subject.instance_variable_get('@replacement'), 'one' => subject.instance_variable_get('@replacement')
}, }
}, }
}) })
end end
end end

View file

@ -9,7 +9,7 @@ describe GrapeLogging::Loggers::Response do
it 'returns an array of parsed JSON objects' do it 'returns an array of parsed JSON objects' do
expect(subject.parameters(nil, response)).to eq({ expect(subject.parameters(nil, response)).to eq({
response: [response.body.first], response: [response.body.first]
}) })
end end
end end
@ -21,7 +21,7 @@ describe GrapeLogging::Loggers::Response do
it 'just returns the body' do it 'just returns the body' do
expect(subject.parameters(nil, response)).to eq({ expect(subject.parameters(nil, response)).to eq({
response: response.body, response: response.body
}) })
end end
end end