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:
- '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
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.

View file

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

View file

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