Skip to content

Commit

Permalink
Customize PercentLiteralDelimiters cop
Browse files Browse the repository at this point in the history
Square brackets emphasize that the %{i,w,W} calls return arrays.

Change-Id: Idf2f271e08f2c0ae72e9034d9762bcba1571d8f9
Reviewed-on: http://gerrit.causes.com/36705
Tested-by: jenkins <[email protected]>
Reviewed-by: Shane da Silva <[email protected]>
  • Loading branch information
sds authored and Shane da Silva committed Mar 29, 2014
1 parent 75dd7d5 commit fe7aea8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ LineLength:
MethodLength:
Max: 20

# Prefer curly braces except for %i/%w/%W, since those return arrays.
PercentLiteralDelimiters:
PreferredDelimiters:
'%': '{}'
'%i': '[]'
'%q': '{}'
'%Q': '{}'
'%r': '{}'
'%s': '()'
'%w': '[]'
'%W': '[]'
'%x': '{}'

SignalException:
Enabled: false

Expand Down

0 comments on commit fe7aea8

Please sign in to comment.