Skip to content

Commit

Permalink
new rubocop: revert Style/SlicingWithRange as it does not work with r…
Browse files Browse the repository at this point in the history
…uby 2.7
  • Loading branch information
jreidinger committed May 31, 2024
1 parent 782b1fc commit c7c1ea9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Naming/PredicateName:
Enabled: false

Naming/MethodParameterName:
Enabled: false
Style/SlicingWithRange:Enabled: false

# Let lslezak decide what to do with it. In general jreidinger does not see it as such big violence of style
Style/StructInheritance:
Expand All @@ -73,3 +73,8 @@ Style/OptionalBooleanParameter:
# it sometimes make code harder to read
Style/GuardClause:
Enabled: false

# disable missing ending range as it is not supported in ruby 2.7
# TODO: is it bug in rubocop that with target ruby version 2.7 it stil do it?
Style/SlicingWithRange:
Enabled: false
2 changes: 1 addition & 1 deletion src/lib/registration/ssl_certificate_details.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def summary(small_space: false)
sha256 = certificate.fingerprint(Fingerprint::SHA256).value
summary += if small_space
# split the long SHA256 digest to two lines in small text mode UI
INDENT + sha256[0..59] + "\n" + INDENT + sha256[60..]
INDENT + sha256[0..59] + "\n" + INDENT + sha256[60..-1]
else
INDENT + sha256
end
Expand Down
2 changes: 1 addition & 1 deletion src/lib/registration/ui/addon_reg_codes_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def reg_code_boxes
box1 = addon_regcode_items(display_addons[0..half - 1])
box2 = HBox(
HSpacing(2),
addon_regcode_items(display_addons[half..])
addon_regcode_items(display_addons[half..-1])
)
else
box1 = addon_regcode_items(addons_with_regcode)
Expand Down

0 comments on commit c7c1ea9

Please sign in to comment.