Autofix for RuboCop: Layout/ElseAlignment

This commit is contained in:
Pieter Oliver 2025-06-30 10:44:23 +01:00
parent 2967344f2b
commit 69f5e392d1
3 changed files with 2 additions and 10 deletions

View file

@ -37,14 +37,6 @@ Layout/CaseIndentation:
Exclude:
- 'claude-scratchpad/cleaner_parameter_filter.rb'
# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
Layout/ElseAlignment:
Exclude:
- 'claude-scratchpad/cleaner_parameter_filter.rb'
- 'lib/grape_logging/middleware/request_logger.rb'
- 'spec/lib/grape_logging/formatters/rails_spec.rb'
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Layout/EmptyLines:

View file

@ -19,7 +19,7 @@ module GrapeLogging
@included_loggers = @options[:include] || []
@reporter = if options[:instrumentation_key]
Reporters::ActiveSupportReporter.new(@options[:instrumentation_key])
else
else
Reporters::LoggerReporter.new(@options[:logger], @options[:formatter], @options[:log_level])
end
end

View file

@ -64,7 +64,7 @@ describe GrapeLogging::Formatters::Rails do
expected_output = if RUBY_VERSION >= '3.4'
' Parameters: {"some_param" => {value_1: "123", value_2: "456"}}'
else
else
' Parameters: {"some_param"=>{:value_1=>"123", :value_2=>"456"}}'
end
expect(lines.first).to eq expected_output