Skip to content

Commit a6ba0bc

Browse files
committed
Handle Rubocop failures
1 parent 202507c commit a6ba0bc

4 files changed

Lines changed: 8 additions & 10 deletions

File tree

.rubocop.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ Metrics/BlockLength:
1212
Exclude:
1313
- 'spec/**/*_spec.rb'
1414

15+
RSpec/SpecFilePathFormat:
16+
Enabled: false
17+
18+
RSpec/FilePath:
19+
Enabled: false
20+
1521
Style/HashEachMethods:
1622
Enabled: true
1723

.rubocop_todo.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ Naming/MethodParameterName:
3333
RSpec/ExampleLength:
3434
Max: 11
3535

36-
# Offense count: 2
37-
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
38-
# Include: **/*_spec*rb*, **/spec/**/*
39-
RSpec/FilePath:
40-
Exclude:
41-
- 'spec/ruby-enum/enum_spec.rb'
42-
- 'spec/ruby-enum/version_spec.rb'
43-
4436
# Offense count: 4
4537
RSpec/LeakyConstantDeclaration:
4638
Exclude:

lib/ruby-enum/errors/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def compose_message(key, attributes = {})
3939
#
4040
# Returns a localized error message string.
4141
def translate(key, options)
42-
::I18n.translate("#{BASE_KEY}.#{key}", **{ locale: :en }.merge(options)).strip
42+
::I18n.translate("#{BASE_KEY}.#{key}", locale: :en, **options).strip
4343
end
4444

4545
# Create the problem.

spec/ruby-enum/enum_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class SecondSubclass < FirstSubclass
122122

123123
describe '#key' do
124124
it 'returns enum instances for values' do
125-
Colors.each do |_, enum|
125+
Colors.each do |_, enum| # rubocop:disable Style/HashEachMethods
126126
expect(Colors.key(enum.value)).to eq(enum.key)
127127
end
128128
end

0 commit comments

Comments
 (0)