Skip to content

Commit

Permalink
Fix non existing wording in HashShorthandSyntax method name
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelma authored and bbatsov committed May 21, 2024
1 parent b9686b5 commit 86b0c39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rubocop/cop/mixin/hash_shorthand_syntax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown)
hash_value_type_breakdown[:value_needed]&.any?
end

def ignore_explicit_ommitable_hash_shorthand_syntax?(hash_value_type_breakdown)
def ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown)
hash_value_type_breakdown.keys == [:value_omittable] &&
enforced_shorthand_syntax == 'consistent_either'
end
Expand Down Expand Up @@ -204,7 +204,7 @@ def mixed_shorthand_syntax_check(hash_value_type_breakdown)

def no_mixed_shorthand_syntax_check(hash_value_type_breakdown)
return if hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown)
return if ignore_explicit_ommitable_hash_shorthand_syntax?(hash_value_type_breakdown)
return if ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown)

each_omittable_value_pair(hash_value_type_breakdown) do |pair_node|
hash_key_source = pair_node.key.source
Expand Down

0 comments on commit 86b0c39

Please sign in to comment.