Fixes variable number naming offenses in spree module

This commit is contained in:
cyrillefr
2025-05-05 17:11:56 +02:00
parent 5d4f8313f3
commit 55ad9429db
3 changed files with 3 additions and 6 deletions

View File

@@ -221,19 +221,16 @@ Metrics/PerceivedComplexity:
- 'app/models/spree/ability.rb'
- 'app/models/spree/order/checkout.rb'
# Offense count: 26
# Offense count: 24
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
# SupportedStyles: snake_case, normalcase, non_integer
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
Naming/VariableNumber:
Exclude:
- 'app/controllers/spree/orders_controller.rb'
- 'app/models/content_configuration.rb'
- 'app/models/preference_sections/main_links_section.rb'
- 'lib/spree/core/controller_helpers/common.rb'
- 'spec/controllers/spree/admin/search_controller_spec.rb'
- 'spec/models/spree/stock_item_spec.rb'
- 'spec/models/spree/tax_rate_spec.rb'
- 'spec/requests/api/orders_spec.rb'
# Offense count: 144

View File

@@ -9,7 +9,7 @@ module Spree
layout 'darkswarm'
rescue_from ActiveRecord::RecordNotFound, with: :render_404
rescue_from ActiveRecord::RecordNotFound, with: :render404
helper 'spree/orders'
respond_to :html, :json

View File

@@ -38,7 +38,7 @@ module Spree
Spree::Config[:default_seo_title]
end
def render_404(_exception = nil)
def render404(_exception = nil)
respond_to do |type|
type.html {
render status: :not_found,