Skip to content

Commit cf146b7

Browse files
tatsuyafwLeFnord
authored andcommitted
Fix RuboCop issues (#326)
* Replace `Layout/IndentFirstHashElement` cop with `Layout/FirstHashElementIndentation` cop The `Layout/IndentFirstHashElement` cop was renamed to `Layout/FirstHashElementIndentation` in RuboCop v0.77.0. * Remove the unnecessary disabling of Style/IfUnlessModifier.
1 parent 1515b25 commit cf146b7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ AllCops:
99
Layout/EmptyLinesAroundArguments:
1010
Enabled: false
1111

12-
Layout/IndentFirstHashElement:
12+
Layout/FirstHashElementIndentation:
1313
EnforcedStyle: consistent
1414

1515
Metrics/AbcSize:

lib/grape_entity/entity.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def self.inherited(subclass)
185185
# field, typically the value is a hash with two fields, type and desc.
186186
# @option options :merge This option allows you to merge an exposed field to the root
187187
#
188-
# rubocop:disable Metrics/LineLength, Style/IfUnlessModifier
188+
# rubocop:disable Metrics/LineLength
189189
def self.expose(*args, &block)
190190
options = merge_options(args.last.is_a?(Hash) ? args.pop : {})
191191

@@ -212,7 +212,7 @@ def self.expose(*args, &block)
212212
@nesting_stack ||= []
213213
args.each { |attribute| build_exposure_for_attribute(attribute, @nesting_stack, options, block) }
214214
end
215-
# rubocop:enable Metrics/LineLength, Style/IfUnlessModifier
215+
# rubocop:enable Metrics/LineLength
216216

217217
def self.build_exposure_for_attribute(attribute, nesting_stack, options, block)
218218
exposure_list = nesting_stack.empty? ? root_exposures : nesting_stack.last.nested_exposures

0 commit comments

Comments
 (0)