Skip to content

Files

Latest commit

 

History

History
24 lines (15 loc) · 419 Bytes

Lint-DuplicateHashKey.md

File metadata and controls

24 lines (15 loc) · 419 Bytes

Pattern: Duplicate hash key

Issue: -

Description

This rule checks for duplicated keys in hash literals. This rule mirrors a warning in Ruby 2.2.

Examples

# bad

hash = { food: 'apple', food: 'orange' }
# good

hash = { food: 'apple', other_food: 'orange' }

Further Reading