Skip to content

Commit

Permalink
add slicing within range #175
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennifer Konikowski committed Jan 25, 2021
1 parent 7ab5f1f commit 5ce9415
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,9 @@ Style/SingleLineMethods:
Enabled: true
AllowIfMethodIsEmpty: false

Style/SlicingWithRange:
Enabled: true

Style/StabbyLambdaParentheses:
Enabled: true
EnforcedStyle: require_parentheses
Expand Down
2 changes: 1 addition & 1 deletion config/ruby-2.3.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
inherit_from: ./base.yml
inherit_from: ./ruby-2.5.yml

AllCops:
TargetRubyVersion: 2.4 # The oldest supported
7 changes: 7 additions & 0 deletions config/ruby-2.5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
inherit_from: ./base.yml

AllCops:
TargetRubyVersion: 2.5

Style/SlicingWithRange:
Enabled: false
2 changes: 2 additions & 0 deletions lib/standard/creates_config_store/assigns_rubocop_yaml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def rubocop_yaml_path(desired_version)
"ruby-2.2.yml"
elsif desired_version < Gem::Version.new("2.4")
"ruby-2.3.yml"
elsif desired_version < Gem::Version.new("2.6")
"ruby-2.5.yml"
else
"base.yml"
end
Expand Down

0 comments on commit 5ce9415

Please sign in to comment.