Skip to content

Commit

Permalink
Merge pull request #8570 from mkllnk/rubocop
Browse files Browse the repository at this point in the history
Update Rubocop config
  • Loading branch information
mkllnk authored Dec 9, 2021
2 parents 8107aa3 + 67aa344 commit 74de65b
Show file tree
Hide file tree
Showing 7 changed files with 952 additions and 843 deletions.
3 changes: 0 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@ inherit_from:
# bundle exec rubocop -c .rubocop_styleguide.yml
#
- .rubocop_styleguide.yml

# A manually compiled todo list to ignore metrics violations on a file-by-file basis.
- .rubocop_manual_todo.yml
776 changes: 0 additions & 776 deletions .rubocop_manual_todo.yml

This file was deleted.

1,008 changes: 950 additions & 58 deletions .rubocop_todo.yml

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions app/models/spree/credit_card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ def cc_type=(type)
end

def set_last_digits
number = @number.to_s.gsub(/\s/, '')
verification_value = verification_value.to_s.gsub(/\s/, '')
self.last_digits ||= number.to_s.length <= 4 ? number : number.to_s.slice(-4..-1)
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/spree/taxon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def active_products

def pretty_name
ancestor_chain = ancestors.inject("") do |name, ancestor|
name += "#{ancestor.name} -> "
name + "#{ancestor.name} -> "
end
ancestor_chain + name.to_s
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ def rules
# rubocop:enable Metrics/MethodLength

# rubocop:disable Metrics/AbcSize
# rubocop:disable Metrics/CyclomaticComplexity
# rubocop:disable Metrics/MethodLength
# rubocop:disable Metrics/PerceivedComplexity
def columns
Expand Down Expand Up @@ -199,7 +198,6 @@ def columns
]
end
# rubocop:enable Metrics/AbcSize
# rubocop:enable Metrics/CyclomaticComplexity
# rubocop:enable Metrics/MethodLength
# rubocop:enable Metrics/PerceivedComplexity

Expand Down
2 changes: 1 addition & 1 deletion lib/spree/core/controller_helpers/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def set_user_language
# The layout to render can be set inside Spree configuration with the +:layout+ option.
# Default layout is: +app/views/spree/layouts/spree_application+
def get_layout
layout ||= Spree::Config[:layout]
Spree::Config[:layout]
end
end
end
Expand Down

0 comments on commit 74de65b

Please sign in to comment.