mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-11 18:26:50 +00:00
Inspecting 1509 files
.........................................................................................................C.........................................C......................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.......................................................................................................................................................................................................................................................................................................................................................................................................................C.........................................................................................................................................................................CCC........................................C......................................................................................C......................................................................................................................................................................................................
Offenses:
app/controllers/split_checkout_controller.rb:5:33: C: [Corrected] Style/RedundantConstantBase: Remove redundant ::.
class SplitCheckoutController < ::BaseController
^^
app/controllers/webhook_endpoints_controller.rb:3:36: C: [Corrected] Style/RedundantConstantBase: Remove redundant ::.
class WebhookEndpointsController < ::BaseController
^^
config.ru:5:9: C: [Corrected] Style/RedundantConstantBase: Remove redundant ::.
require ::File.expand_path('config/environment', __dir__)
^^
spec/helpers/checkout_helper_spec.rb:168:68: C: [Corrected] Style/RedundantConstantBase: Remove redundant ::.
let!(:tax_rate) { create(:tax_rate, amount: 0.1, calculator: ::Calculator::DefaultTax.new) }
^^
spec/models/spree/order_spec.rb:619:25: C: [Corrected] Style/RedundantConstantBase: Remove redundant ::.
let(:fee_handler) { ::OrderFeesHandler.new(subject) }
^^
spec/models/spree/payment_method_spec.rb:150:51: C: [Corrected] Style/RedundantConstantBase: Remove redundant ::.
calculator: ::Calculator::FlatRate.new(preferred_amount: 10))
^^
spec/models/spree/payment_method_spec.rb:154:54: C: [Corrected] Style/RedundantConstantBase: Remove redundant ::.
calculator: ::Calculator::FlatPercentItemTotal
^^
spec/models/spree/payment_spec.rb:429:49: C: [Corrected] Style/RedundantConstantBase: Remove redundant ::.
create(:payment_method, calculator: ::Calculator::FlatRate.new(preferred_amount: 10))
^^
spec/models/spree/payment_spec.rb:1002:11: C: [Corrected] Style/RedundantConstantBase: Remove redundant ::.
::Calculator::FlatPercentItemTotal.new(preferred_flat_percent: 10)
^^
spec/models/spree/payment_spec.rb:1039:28: C: [Corrected] Style/RedundantConstantBase: Remove redundant ::.
let(:calculator) { ::Calculator::FlatPercentItemTotal.new(preferred_flat_percent: 10) }
^^
spec/queries/complete_visible_orders_spec.rb:12:31: C: [Corrected] Style/RedundantConstantBase: Remove redundant ::.
let(:order_permissions) { ::Permissions::Order.new(user, filter_canceled) }
^^
spec/services/paypal_items_builder_spec.rb:34:37: C: [Corrected] Style/RedundantConstantBase: Remove redundant ::.
calculator: ::Calculator::DefaultTax.new)
^^
spec/services/paypal_items_builder_spec.rb:38:37: C: [Corrected] Style/RedundantConstantBase: Remove redundant ::.
calculator: ::Calculator::DefaultTax.new)
^^
1509 files inspected, 13 offenses detected, 13 offenses corrected
1054 lines
41 KiB
YAML
1054 lines
41 KiB
YAML
# This configuration was generated by
|
|
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 1400 --no-auto-gen-timestamp`
|
|
# using RuboCop version 1.57.2.
|
|
# The point is for the user to remove these configuration records
|
|
# one by one as the offenses are removed from the code base.
|
|
# Note that changes in the inspected code, or installation of new
|
|
# versions of RuboCop, may require this file to be generated again.
|
|
|
|
# Offense count: 2
|
|
# This cop supports safe autocorrection (--autocorrect).
|
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
|
# URISchemes: http, https
|
|
Layout/LineLength:
|
|
Exclude:
|
|
- 'app/models/spree/payment.rb'
|
|
- 'spec/system/admin/tag_rules_spec.rb'
|
|
|
|
# Offense count: 17
|
|
# Configuration parameters: AllowedMethods.
|
|
# AllowedMethods: enums
|
|
Lint/ConstantDefinitionInBlock:
|
|
Exclude:
|
|
- 'lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb'
|
|
- 'lib/tasks/import_product_images.rake'
|
|
- 'lib/tasks/users.rake'
|
|
- 'spec/controllers/spree/admin/base_controller_spec.rb'
|
|
- 'spec/helpers/serializer_helper_spec.rb'
|
|
- 'spec/lib/reports/line_items_spec.rb'
|
|
- 'spec/models/spree/ability_spec.rb'
|
|
- 'spec/models/spree/gateway_spec.rb'
|
|
- 'spec/models/spree/preferences/configuration_spec.rb'
|
|
- 'spec/models/spree/preferences/preferable_spec.rb'
|
|
- 'spec/validators/date_time_string_validator_spec.rb'
|
|
- 'spec/validators/integer_array_validator_spec.rb'
|
|
|
|
# Offense count: 6
|
|
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
|
|
Lint/DuplicateBranch:
|
|
Exclude:
|
|
- 'app/helpers/spree/admin/base_helper.rb'
|
|
- 'app/models/enterprise.rb'
|
|
- 'app/models/spree/calculator.rb'
|
|
- 'app/models/spree/preference.rb'
|
|
- 'app/models/spree/preferences/preferable.rb'
|
|
|
|
# Offense count: 2
|
|
Lint/DuplicateMethods:
|
|
Exclude:
|
|
- 'lib/discourse/single_sign_on.rb'
|
|
|
|
# Offense count: 1
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Lint/DuplicateRequire:
|
|
Exclude:
|
|
- 'spec/lib/open_food_network/scope_variants_to_search_spec.rb'
|
|
|
|
# Offense count: 18
|
|
# Configuration parameters: AllowComments, AllowEmptyLambdas.
|
|
Lint/EmptyBlock:
|
|
Exclude:
|
|
- 'engines/catalog/config/routes.rb'
|
|
- 'spec/components/distributor_title_component_spec.rb'
|
|
- 'spec/components/example_component_spec.rb'
|
|
- 'spec/controllers/admin/subscription_line_items_controller_spec.rb'
|
|
- 'spec/controllers/api/v0/shipments_controller_spec.rb'
|
|
- 'spec/controllers/concerns/extra_fields_spec.rb'
|
|
- 'spec/factories.rb'
|
|
- 'spec/factories/enterprise_factory.rb'
|
|
- 'spec/jobs/order_cycle_opened_job_spec.rb'
|
|
- 'spec/jobs/subscription_placement_job_spec.rb'
|
|
- 'spec/models/product_import/entry_validator_spec.rb'
|
|
|
|
# Offense count: 6
|
|
# Configuration parameters: AllowComments.
|
|
Lint/EmptyClass:
|
|
Exclude:
|
|
- 'spec/controllers/spree/admin/base_controller_spec.rb'
|
|
- 'spec/lib/reports/report_loader_spec.rb'
|
|
|
|
# Offense count: 1
|
|
# Configuration parameters: AllowComments.
|
|
Lint/EmptyFile:
|
|
Exclude:
|
|
- 'spec/lib/open_food_network/enterprise_injection_data_spec.rb'
|
|
|
|
# Offense count: 2
|
|
Lint/FloatComparison:
|
|
Exclude:
|
|
- 'app/models/product_import/entry_validator.rb'
|
|
- 'app/models/spree/gateway/pay_pal_express.rb'
|
|
|
|
# Offense count: 1
|
|
Lint/IneffectiveAccessModifier:
|
|
Exclude:
|
|
- 'app/models/spree/user.rb'
|
|
|
|
# Offense count: 1
|
|
Lint/NoReturnInBeginEndBlocks:
|
|
Exclude:
|
|
- 'app/controllers/payment_gateways/stripe_controller.rb'
|
|
|
|
# Offense count: 4
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Lint/RedundantDirGlobSort:
|
|
Exclude:
|
|
- 'engines/catalog/spec/spec_helper.rb'
|
|
- 'engines/dfc_provider/spec/spec_helper.rb'
|
|
- 'spec/base_spec_helper.rb'
|
|
- 'spec/system_helper.rb'
|
|
|
|
# Offense count: 1
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: AllowedMethods.
|
|
# AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?, presence, present?
|
|
Lint/RedundantSafeNavigation:
|
|
Exclude:
|
|
- 'app/models/spree/payment.rb'
|
|
|
|
# Offense count: 1
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Lint/UselessMethodDefinition:
|
|
Exclude:
|
|
- 'app/models/spree/gateway.rb'
|
|
|
|
# Offense count: 27
|
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
Metrics/AbcSize:
|
|
Exclude:
|
|
- 'app/controllers/admin/enterprises_controller.rb'
|
|
- 'app/controllers/payment_gateways/paypal_controller.rb'
|
|
- 'app/controllers/spree/admin/payments_controller.rb'
|
|
- 'app/controllers/spree/admin/taxons_controller.rb'
|
|
- 'app/controllers/spree/admin/variants_controller.rb'
|
|
- 'app/controllers/spree/orders_controller.rb'
|
|
- 'app/helpers/spree/admin/navigation_helper.rb'
|
|
- 'app/models/enterprise_group.rb'
|
|
- 'app/models/enterprise_relationship.rb'
|
|
- 'app/models/product_import/entry_processor.rb'
|
|
- 'app/models/spree/ability.rb'
|
|
- 'app/models/spree/address.rb'
|
|
- 'app/models/spree/order/checkout.rb'
|
|
- 'app/models/spree/preferences/preferable_class_methods.rb'
|
|
- 'app/models/spree/return_authorization.rb'
|
|
- 'lib/discourse/single_sign_on.rb'
|
|
- 'lib/open_food_network/order_cycle_form_applicator.rb'
|
|
- 'lib/open_food_network/order_cycle_permissions.rb'
|
|
- 'lib/spree/core/controller_helpers/order.rb'
|
|
- 'lib/tasks/enterprises.rake'
|
|
- 'spec/services/order_checkout_restart_spec.rb'
|
|
|
|
# Offense count: 44
|
|
# Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
# AllowedMethods: refine
|
|
Metrics/BlockLength:
|
|
Exclude:
|
|
- 'app/models/spree/order/checkout.rb'
|
|
- 'app/models/spree/payment.rb'
|
|
- 'app/models/spree/payment/processing.rb'
|
|
- 'app/models/spree/shipment.rb'
|
|
- 'lib/spree/core/controller_helpers/common.rb'
|
|
- 'lib/tasks/data.rake'
|
|
- 'spec/factories.rb'
|
|
- 'spec/factories/address_factory.rb'
|
|
- 'spec/factories/enterprise_factory.rb'
|
|
- 'spec/factories/line_item_factory.rb'
|
|
- 'spec/factories/order_cycle_factory.rb'
|
|
- 'spec/factories/order_factory.rb'
|
|
- 'spec/factories/product_factory.rb'
|
|
- 'spec/factories/shipment_factory.rb'
|
|
- 'spec/factories/shipping_method_factory.rb'
|
|
- 'spec/factories/subscription_factory.rb'
|
|
- 'spec/factories/user_factory.rb'
|
|
- 'spec/factories/variant_factory.rb'
|
|
- 'spec/requests/checkout/failed_checkout_spec.rb'
|
|
- 'spec/requests/checkout/stripe_sca_spec.rb'
|
|
- 'spec/support/cancan_helper.rb'
|
|
- 'spec/support/matchers/select2_matchers.rb'
|
|
- 'spec/support/matchers/table_matchers.rb'
|
|
- 'spec/system/consumer/shopping/checkout_spec.rb'
|
|
- 'spec/system/consumer/shopping/checkout_stripe_spec.rb'
|
|
- 'spec/system/consumer/shopping/variant_overrides_spec.rb'
|
|
|
|
# Offense count: 1
|
|
# Configuration parameters: CountBlocks, Max.
|
|
Metrics/BlockNesting:
|
|
Exclude:
|
|
- 'app/models/spree/payment/processing.rb'
|
|
|
|
# Offense count: 46
|
|
# Configuration parameters: CountComments, Max, CountAsOne.
|
|
Metrics/ClassLength:
|
|
Exclude:
|
|
- 'app/controllers/admin/enterprises_controller.rb'
|
|
- 'app/controllers/admin/order_cycles_controller.rb'
|
|
- 'app/controllers/admin/product_import_controller.rb'
|
|
- 'app/controllers/admin/resource_controller.rb'
|
|
- 'app/controllers/admin/subscriptions_controller.rb'
|
|
- 'app/controllers/application_controller.rb'
|
|
- 'app/controllers/payment_gateways/paypal_controller.rb'
|
|
- 'app/controllers/spree/admin/orders_controller.rb'
|
|
- 'app/controllers/spree/admin/payment_methods_controller.rb'
|
|
- 'app/controllers/spree/admin/payments_controller.rb'
|
|
- 'app/controllers/spree/admin/products_controller.rb'
|
|
- 'app/controllers/spree/admin/users_controller.rb'
|
|
- 'app/controllers/spree/orders_controller.rb'
|
|
- 'app/models/enterprise.rb'
|
|
- 'app/models/invoice/data_presenter.rb'
|
|
- 'app/models/order_cycle.rb'
|
|
- 'app/models/product_import/entry_processor.rb'
|
|
- 'app/models/product_import/entry_validator.rb'
|
|
- 'app/models/product_import/product_importer.rb'
|
|
- 'app/models/spree/ability.rb'
|
|
- 'app/models/spree/address.rb'
|
|
- 'app/models/spree/credit_card.rb'
|
|
- 'app/models/spree/gateway/stripe_sca.rb'
|
|
- 'app/models/spree/line_item.rb'
|
|
- 'app/models/spree/order.rb'
|
|
- 'app/models/spree/payment.rb'
|
|
- 'app/models/spree/product.rb'
|
|
- 'app/models/spree/shipment.rb'
|
|
- 'app/models/spree/user.rb'
|
|
- 'app/models/spree/variant.rb'
|
|
- 'app/models/spree/zone.rb'
|
|
- 'app/reflexes/products_reflex.rb'
|
|
- 'app/serializers/api/cached_enterprise_serializer.rb'
|
|
- 'app/serializers/api/enterprise_shopfront_serializer.rb'
|
|
- 'app/services/cart_service.rb'
|
|
- 'app/services/order_cycle_form.rb'
|
|
- 'app/services/order_syncer.rb'
|
|
- 'engines/order_management/app/services/order_management/order/updater.rb'
|
|
- 'lib/open_food_network/enterprise_fee_calculator.rb'
|
|
- 'lib/open_food_network/order_cycle_form_applicator.rb'
|
|
- 'lib/open_food_network/order_cycle_permissions.rb'
|
|
- 'lib/open_food_network/permissions.rb'
|
|
- 'lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_order.rb'
|
|
- 'lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_producer.rb'
|
|
- 'lib/reporting/reports/enterprise_fee_summary/scope.rb'
|
|
- 'lib/reporting/reports/xero_invoices/base.rb'
|
|
|
|
# Offense count: 34
|
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
Metrics/CyclomaticComplexity:
|
|
Exclude:
|
|
- 'app/controllers/admin/enterprises_controller.rb'
|
|
- 'app/controllers/spree/admin/taxons_controller.rb'
|
|
- 'app/controllers/spree/orders_controller.rb'
|
|
- 'app/helpers/checkout_helper.rb'
|
|
- 'app/helpers/order_cycles_helper.rb'
|
|
- 'app/helpers/spree/admin/navigation_helper.rb'
|
|
- 'app/models/enterprise.rb'
|
|
- 'app/models/enterprise_relationship.rb'
|
|
- 'app/models/product_import/entry_validator.rb'
|
|
- 'app/models/spree/ability.rb'
|
|
- 'app/models/spree/address.rb'
|
|
- 'app/models/spree/order/checkout.rb'
|
|
- 'app/models/spree/order_inventory.rb'
|
|
- 'app/models/spree/preference.rb'
|
|
- 'app/models/spree/preferences/preferable.rb'
|
|
- 'app/models/spree/preferences/preferable_class_methods.rb'
|
|
- 'app/models/spree/return_authorization.rb'
|
|
- 'app/models/spree/tax_rate.rb'
|
|
- 'app/models/spree/variant.rb'
|
|
- 'app/models/spree/zone.rb'
|
|
- 'lib/discourse/single_sign_on.rb'
|
|
- 'lib/open_food_network/enterprise_issue_validator.rb'
|
|
- 'lib/reporting/reports/xero_invoices/base.rb'
|
|
- 'lib/spree/core/controller_helpers/order.rb'
|
|
- 'lib/spree/core/controller_helpers/respond_with.rb'
|
|
- 'lib/spree/localized_number.rb'
|
|
- 'spec/models/product_importer_spec.rb'
|
|
|
|
# Offense count: 25
|
|
# Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
Metrics/MethodLength:
|
|
Exclude:
|
|
- 'app/controllers/admin/enterprises_controller.rb'
|
|
- 'app/controllers/payment_gateways/paypal_controller.rb'
|
|
- 'app/controllers/spree/admin/taxons_controller.rb'
|
|
- 'app/controllers/spree/orders_controller.rb'
|
|
- 'app/helpers/spree/admin/navigation_helper.rb'
|
|
- 'app/models/spree/ability.rb'
|
|
- 'app/models/spree/gateway/pay_pal_express.rb'
|
|
- 'app/models/spree/order/checkout.rb'
|
|
- 'app/models/spree/payment/processing.rb'
|
|
- 'app/models/spree/preferences/preferable_class_methods.rb'
|
|
- 'lib/discourse/single_sign_on.rb'
|
|
- 'lib/open_food_network/order_cycle_form_applicator.rb'
|
|
- 'lib/open_food_network/order_cycle_permissions.rb'
|
|
- 'lib/reporting/reports/enterprise_fee_summary/scope.rb'
|
|
- 'lib/reporting/reports/xero_invoices/base.rb'
|
|
- 'lib/spree/localized_number.rb'
|
|
- 'lib/tasks/sample_data/product_factory.rb'
|
|
|
|
# Offense count: 48
|
|
# Configuration parameters: CountComments, Max, CountAsOne.
|
|
Metrics/ModuleLength:
|
|
Exclude:
|
|
- 'app/helpers/admin/injection_helper.rb'
|
|
- 'app/helpers/checkout_helper.rb'
|
|
- 'app/helpers/injection_helper.rb'
|
|
- 'app/helpers/spree/admin/base_helper.rb'
|
|
- 'app/helpers/spree/admin/navigation_helper.rb'
|
|
- 'app/helpers/spree/admin/orders_helper.rb'
|
|
- 'app/models/spree/order/checkout.rb'
|
|
- 'app/models/spree/payment/processing.rb'
|
|
- 'engines/catalog/spec/services/catalog/product_import/products_reset_strategy_spec.rb'
|
|
- 'engines/order_management/spec/services/order_management/order/updater_spec.rb'
|
|
- 'engines/order_management/spec/services/order_management/stock/package_spec.rb'
|
|
- 'engines/order_management/spec/services/order_management/subscriptions/estimator_spec.rb'
|
|
- 'engines/order_management/spec/services/order_management/subscriptions/form_spec.rb'
|
|
- 'engines/order_management/spec/services/order_management/subscriptions/proxy_order_syncer_spec.rb'
|
|
- 'engines/order_management/spec/services/order_management/subscriptions/summarizer_spec.rb'
|
|
- 'engines/order_management/spec/services/order_management/subscriptions/summary_spec.rb'
|
|
- 'engines/order_management/spec/services/order_management/subscriptions/validator_spec.rb'
|
|
- 'engines/order_management/spec/services/order_management/subscriptions/variants_list_spec.rb'
|
|
- 'lib/open_food_network/column_preference_defaults.rb'
|
|
- 'spec/controllers/admin/customers_controller_spec.rb'
|
|
- 'spec/controllers/admin/order_cycles_controller_spec.rb'
|
|
- 'spec/controllers/api/v0/order_cycles_controller_spec.rb'
|
|
- 'spec/controllers/api/v0/orders_controller_spec.rb'
|
|
- 'spec/controllers/payment_gateways/stripe_controller_spec.rb'
|
|
- 'spec/controllers/spree/admin/adjustments_controller_spec.rb'
|
|
- 'spec/controllers/spree/admin/payment_methods_controller_spec.rb'
|
|
- 'spec/lib/open_food_network/address_finder_spec.rb'
|
|
- 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb'
|
|
- 'spec/lib/open_food_network/order_cycle_form_applicator_spec.rb'
|
|
- 'spec/lib/open_food_network/order_cycle_permissions_spec.rb'
|
|
- 'spec/lib/open_food_network/permissions_spec.rb'
|
|
- 'spec/lib/open_food_network/scope_variant_to_hub_spec.rb'
|
|
- 'spec/lib/open_food_network/tag_rule_applicator_spec.rb'
|
|
- 'spec/lib/reports/customers_report_spec.rb'
|
|
- 'spec/lib/reports/enterprise_fee_summary/authorizer_spec.rb'
|
|
- 'spec/lib/reports/order_cycle_management_report_spec.rb'
|
|
- 'spec/lib/reports/products_and_inventory_report_spec.rb'
|
|
- 'spec/lib/reports/users_and_enterprises_report_spec.rb'
|
|
- 'spec/models/spree/adjustment_spec.rb'
|
|
- 'spec/models/spree/credit_card_spec.rb'
|
|
- 'spec/models/spree/line_item_spec.rb'
|
|
- 'spec/models/spree/order/tax_spec.rb'
|
|
- 'spec/models/spree/product_spec.rb'
|
|
- 'spec/models/spree/shipping_method_spec.rb'
|
|
- 'spec/models/spree/tax_rate_spec.rb'
|
|
- 'spec/services/permissions/order_spec.rb'
|
|
- 'spec/services/variant_units/option_value_namer_spec.rb'
|
|
- 'spec/support/request/stripe_stubs.rb'
|
|
|
|
# Offense count: 7
|
|
# Configuration parameters: Max, CountKeywordArgs, MaxOptionalParameters.
|
|
Metrics/ParameterLists:
|
|
Exclude:
|
|
- 'app/helpers/angular_form_builder.rb'
|
|
- 'app/models/product_import/entry_processor.rb'
|
|
- 'lib/reporting/reports/xero_invoices/base.rb'
|
|
- 'spec/support/controller_requests_helper.rb'
|
|
- 'spec/system/admin/reports_spec.rb'
|
|
|
|
# Offense count: 4
|
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
Metrics/PerceivedComplexity:
|
|
Exclude:
|
|
- 'app/controllers/spree/admin/taxons_controller.rb'
|
|
- 'app/models/enterprise_relationship.rb'
|
|
- 'app/models/spree/ability.rb'
|
|
- 'app/models/spree/order/checkout.rb'
|
|
|
|
# Offense count: 8
|
|
Naming/AccessorMethodName:
|
|
Exclude:
|
|
- 'app/controllers/spree/admin/taxonomies_controller.rb'
|
|
- 'app/mailers/producer_mailer.rb'
|
|
- 'app/models/spree/order.rb'
|
|
- 'app/services/checkout/post_checkout_actions.rb'
|
|
- 'lib/spree/core/controller_helpers/common.rb'
|
|
- 'spec/support/request/shop_workflow.rb'
|
|
- 'spec/support/request/web_helper.rb'
|
|
|
|
# Offense count: 1
|
|
# Configuration parameters: ForbiddenDelimiters.
|
|
# ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
|
|
Naming/HeredocDelimiterNaming:
|
|
Exclude:
|
|
- 'app/models/content_configuration.rb'
|
|
|
|
# Offense count: 5
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
|
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
|
Naming/MemoizedInstanceVariableName:
|
|
Exclude:
|
|
- 'app/mailers/producer_mailer.rb'
|
|
- 'app/models/concerns/balance.rb'
|
|
- 'lib/open_food_network/address_finder.rb'
|
|
|
|
# Offense count: 1
|
|
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
|
Naming/MethodParameterName:
|
|
Exclude:
|
|
- 'app/services/process_payment_intent.rb'
|
|
|
|
# Offense count: 28
|
|
# 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/factories/stock_location_factory.rb'
|
|
- 'spec/models/spree/stock_item_spec.rb'
|
|
- 'spec/models/spree/tax_rate_spec.rb'
|
|
- 'spec/requests/api/orders_spec.rb'
|
|
|
|
# Offense count: 11
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
# AllowedMethods: order, limit, select, lock
|
|
Rails/FindEach:
|
|
Exclude:
|
|
- 'app/controllers/admin/order_cycles_controller.rb'
|
|
- 'app/jobs/subscription_confirm_job.rb'
|
|
- 'app/services/orders_bulk_cancel_service.rb'
|
|
- 'app/services/products_renderer.rb'
|
|
- 'lib/tasks/data.rake'
|
|
- 'lib/tasks/subscriptions/debug.rake'
|
|
- 'spec/system/admin/bulk_order_management_spec.rb'
|
|
- 'spec/system/admin/enterprise_relationships_spec.rb'
|
|
|
|
# Offense count: 11
|
|
# Configuration parameters: Include.
|
|
# Include: app/models/**/*.rb
|
|
Rails/HasManyOrHasOneDependent:
|
|
Exclude:
|
|
- 'app/models/enterprise.rb'
|
|
- 'app/models/spree/address.rb'
|
|
- 'app/models/spree/stock_item.rb'
|
|
- 'app/models/spree/tax_rate.rb'
|
|
- 'app/models/spree/variant.rb'
|
|
|
|
# Offense count: 25
|
|
# Configuration parameters: Include.
|
|
# Include: app/helpers/**/*.rb
|
|
Rails/HelperInstanceVariable:
|
|
Exclude:
|
|
- 'app/helpers/injection_helper.rb'
|
|
- 'app/helpers/shared_helper.rb'
|
|
- 'app/helpers/spree/admin/orders_helper.rb'
|
|
- 'app/helpers/spree/orders_helper.rb'
|
|
|
|
# Offense count: 8
|
|
# Configuration parameters: Include.
|
|
# Include: spec/**/*.rb, test/**/*.rb
|
|
Rails/I18nLocaleAssignment:
|
|
Exclude:
|
|
- 'spec/controllers/user_registrations_controller_spec.rb'
|
|
- 'spec/helpers/i18n_helper_spec.rb'
|
|
- 'spec/models/spree/variant_spec.rb'
|
|
- 'spec/system/admin/order_cycles/list_spec.rb'
|
|
|
|
# Offense count: 3
|
|
Rails/I18nLocaleTexts:
|
|
Exclude:
|
|
- 'app/controllers/admin/stripe_accounts_controller.rb'
|
|
|
|
# Offense count: 22
|
|
# Configuration parameters: IgnoreScopes, Include.
|
|
# Include: app/models/**/*.rb
|
|
Rails/InverseOf:
|
|
Exclude:
|
|
- 'app/models/enterprise.rb'
|
|
- 'app/models/order_cycle.rb'
|
|
- 'app/models/spree/country.rb'
|
|
- 'app/models/spree/inventory_unit.rb'
|
|
- 'app/models/spree/line_item.rb'
|
|
- 'app/models/spree/order.rb'
|
|
- 'app/models/spree/payment.rb'
|
|
- 'app/models/spree/price.rb'
|
|
- 'app/models/spree/product.rb'
|
|
- 'app/models/spree/stock_item.rb'
|
|
- 'app/models/spree/taxonomy.rb'
|
|
- 'app/models/spree/variant.rb'
|
|
- 'app/models/subscription_line_item.rb'
|
|
|
|
# Offense count: 35
|
|
# Configuration parameters: Include.
|
|
# Include: app/controllers/**/*.rb, app/mailers/**/*.rb
|
|
Rails/LexicallyScopedActionFilter:
|
|
Exclude:
|
|
- 'app/controllers/admin/enterprise_groups_controller.rb'
|
|
- 'app/controllers/admin/enterprises_controller.rb'
|
|
- 'app/controllers/admin/order_cycles_controller.rb'
|
|
- 'app/controllers/admin/producer_properties_controller.rb'
|
|
- 'app/controllers/admin/product_import_controller.rb'
|
|
- 'app/controllers/admin/schedules_controller.rb'
|
|
- 'app/controllers/admin/subscriptions_controller.rb'
|
|
- 'app/controllers/concerns/checkout_callbacks.rb'
|
|
- 'app/controllers/registration_controller.rb'
|
|
- 'app/controllers/spree/admin/adjustments_controller.rb'
|
|
- 'app/controllers/spree/admin/payment_methods_controller.rb'
|
|
- 'app/controllers/spree/admin/payments_controller.rb'
|
|
- 'app/controllers/spree/admin/products_controller.rb'
|
|
- 'app/controllers/spree/admin/return_authorizations_controller.rb'
|
|
- 'app/controllers/spree/admin/search_controller.rb'
|
|
- 'app/controllers/spree/admin/shipping_methods_controller.rb'
|
|
- 'app/controllers/spree/admin/users_controller.rb'
|
|
- 'app/controllers/spree/admin/zones_controller.rb'
|
|
- 'app/controllers/spree/users_controller.rb'
|
|
|
|
# Offense count: 6
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Rails/NegateInclude:
|
|
Exclude:
|
|
- 'app/controllers/admin/resource_controller.rb'
|
|
- 'app/models/calculator/weight.rb'
|
|
- 'app/models/product_import/spreadsheet_entry.rb'
|
|
- 'app/services/order_cart_reset.rb'
|
|
- 'lib/spree/localized_number.rb'
|
|
- 'spec/support/matchers/table_matchers.rb'
|
|
|
|
# Offense count: 16
|
|
Rails/OutputSafety:
|
|
Exclude:
|
|
- 'app/helpers/angular_form_helper.rb'
|
|
- 'app/helpers/application_helper.rb'
|
|
- 'app/helpers/reports_helper.rb'
|
|
- 'app/helpers/spree/admin/base_helper.rb'
|
|
- 'app/helpers/spree/admin/navigation_helper.rb'
|
|
- 'app/helpers/spree/admin/orders_helper.rb'
|
|
- 'app/helpers/spree/admin/zones_helper.rb'
|
|
- 'lib/reporting/queries/query_builder.rb'
|
|
- 'lib/reporting/queries/query_interface.rb'
|
|
- 'lib/spree/money.rb'
|
|
|
|
# Offense count: 31
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Rails/Pluck:
|
|
Exclude:
|
|
- 'app/controllers/admin/variant_overrides_controller.rb'
|
|
- 'app/services/cart_service.rb'
|
|
- 'lib/reporting/report_headers_builder.rb'
|
|
- 'spec/controllers/admin/bulk_line_items_controller_spec.rb'
|
|
- 'spec/controllers/admin/subscriptions_controller_spec.rb'
|
|
- 'spec/controllers/api/v0/order_cycles_controller_spec.rb'
|
|
- 'spec/controllers/api/v0/orders_controller_spec.rb'
|
|
- 'spec/controllers/api/v0/products_controller_spec.rb'
|
|
- 'spec/controllers/api/v0/shops_controller_spec.rb'
|
|
- 'spec/controllers/api/v0/states_controller_spec.rb'
|
|
- 'spec/controllers/api/v0/taxons_controller_spec.rb'
|
|
- 'spec/helpers/spree/admin/orders_helper_spec.rb'
|
|
- 'spec/lib/reports/lettuce_share_report_spec.rb'
|
|
- 'spec/lib/reports/users_and_enterprises_report_spec.rb'
|
|
- 'spec/serializers/api/admin/for_order_cycle/supplied_product_serializer_spec.rb'
|
|
|
|
# Offense count: 1
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: EnforcedStyle.
|
|
# SupportedStyles: conservative, aggressive
|
|
Rails/PluckInWhere:
|
|
Exclude:
|
|
- 'app/models/spree/variant.rb'
|
|
|
|
# Offense count: 4
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: AllowedReceivers.
|
|
# AllowedReceivers: ActionMailer::Preview, ActiveSupport::TimeZone
|
|
Rails/RedundantActiveRecordAllMethod:
|
|
Exclude:
|
|
- 'app/models/spree/tax_rate.rb'
|
|
- 'app/models/spree/user.rb'
|
|
- 'app/models/spree/variant.rb'
|
|
- 'spec/system/admin/product_import_spec.rb'
|
|
|
|
# Offense count: 20
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Rails/RedundantPresenceValidationOnBelongsTo:
|
|
Exclude:
|
|
- 'app/models/enterprise_fee.rb'
|
|
- 'app/models/exchange.rb'
|
|
- 'app/models/inventory_item.rb'
|
|
- 'app/models/order_cycle.rb'
|
|
- 'app/models/spree/address.rb'
|
|
- 'app/models/spree/line_item.rb'
|
|
- 'app/models/spree/order.rb'
|
|
- 'app/models/spree/product_property.rb'
|
|
- 'app/models/spree/return_authorization.rb'
|
|
- 'app/models/spree/state.rb'
|
|
- 'app/models/spree/stock_item.rb'
|
|
- 'app/models/spree/stock_movement.rb'
|
|
- 'app/models/spree/tax_rate.rb'
|
|
- 'app/models/subscription_line_item.rb'
|
|
- 'app/models/tag_rule.rb'
|
|
- 'app/models/variant_override.rb'
|
|
|
|
# Offense count: 1
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Rails/RelativeDateConstant:
|
|
Exclude:
|
|
- 'lib/tasks/data/remove_transient_data.rb'
|
|
|
|
# Offense count: 58
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: Include.
|
|
# Include: spec/controllers/**/*.rb, spec/requests/**/*.rb, test/controllers/**/*.rb, test/integration/**/*.rb
|
|
Rails/ResponseParsedBody:
|
|
Exclude:
|
|
- 'spec/controllers/admin/bulk_line_items_controller_spec.rb'
|
|
- 'spec/controllers/admin/customers_controller_spec.rb'
|
|
- 'spec/controllers/admin/order_cycles_controller_spec.rb'
|
|
- 'spec/controllers/admin/proxy_orders_controller_spec.rb'
|
|
- 'spec/controllers/admin/schedules_controller_spec.rb'
|
|
- 'spec/controllers/admin/stripe_accounts_controller_spec.rb'
|
|
- 'spec/controllers/admin/subscription_line_items_controller_spec.rb'
|
|
- 'spec/controllers/admin/subscriptions_controller_spec.rb'
|
|
- 'spec/controllers/cart_controller_spec.rb'
|
|
- 'spec/controllers/line_items_controller_spec.rb'
|
|
- 'spec/controllers/spree/admin/search_controller_spec.rb'
|
|
- 'spec/controllers/spree/credit_cards_controller_spec.rb'
|
|
- 'spec/controllers/user_registrations_controller_spec.rb'
|
|
|
|
# Offense count: 3
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Rails/RootPathnameMethods:
|
|
Exclude:
|
|
- 'spec/lib/reports/orders_and_fulfillment/order_cycle_customer_totals_report_spec.rb'
|
|
- 'spec/models/terms_of_service_file_spec.rb'
|
|
- 'spec/system/admin/configuration/terms_of_service_files_spec.rb'
|
|
|
|
# Offense count: 1
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Rails/SelectMap:
|
|
Exclude:
|
|
- 'app/models/enterprise.rb'
|
|
|
|
# Offense count: 4
|
|
# Configuration parameters: ForbiddenMethods, AllowedMethods.
|
|
# ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all
|
|
Rails/SkipsModelValidations:
|
|
Exclude:
|
|
- 'app/models/variant_override.rb'
|
|
- 'spec/models/spree/line_item_spec.rb'
|
|
|
|
# Offense count: 3
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Rails/SquishedSQLHeredocs:
|
|
Exclude:
|
|
- 'app/queries/customers_with_balance.rb'
|
|
- 'app/queries/outstanding_balance.rb'
|
|
- 'spec/queries/outstanding_balance_spec.rb'
|
|
|
|
# Offense count: 7
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: EnforcedStyle.
|
|
# SupportedStyles: strict, flexible
|
|
Rails/TimeZone:
|
|
Exclude:
|
|
- 'app/models/spree/gateway/pay_pal_express.rb'
|
|
- 'spec/controllers/spree/credit_cards_controller_spec.rb'
|
|
- 'spec/services/customer_order_cancellation_spec.rb'
|
|
- 'spec/services/order_cycle_webhook_service_spec.rb'
|
|
|
|
# Offense count: 1
|
|
# Configuration parameters: TransactionMethods.
|
|
Rails/TransactionExitStatement:
|
|
Exclude:
|
|
- 'app/services/place_proxy_order.rb'
|
|
|
|
# Offense count: 5
|
|
# Configuration parameters: Include.
|
|
# Include: app/models/**/*.rb
|
|
Rails/UniqueValidationWithoutIndex:
|
|
Exclude:
|
|
- 'app/models/customer.rb'
|
|
- 'app/models/exchange.rb'
|
|
- 'app/models/spree/stock_item.rb'
|
|
- 'app/models/spree/tax_category.rb'
|
|
- 'app/models/spree/zone.rb'
|
|
|
|
# Offense count: 1
|
|
# Configuration parameters: Severity, Environments.
|
|
# Environments: development, test, production
|
|
Rails/UnknownEnv:
|
|
Exclude:
|
|
- 'app/models/spree/app_configuration.rb'
|
|
|
|
# Offense count: 7
|
|
# Configuration parameters: Severity.
|
|
Rails/UnusedRenderContent:
|
|
Exclude:
|
|
- 'app/controllers/admin/bulk_line_items_controller.rb'
|
|
- 'app/controllers/admin/tag_rules_controller.rb'
|
|
- 'app/controllers/api/v0/enterprise_fees_controller.rb'
|
|
- 'app/controllers/api/v0/products_controller.rb'
|
|
- 'app/controllers/api/v0/taxons_controller.rb'
|
|
- 'app/controllers/api/v0/variants_controller.rb'
|
|
|
|
# Offense count: 55
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Rails/WhereEquals:
|
|
Exclude:
|
|
- 'app/controllers/spree/admin/products_controller.rb'
|
|
- 'app/mailers/producer_mailer.rb'
|
|
- 'app/models/enterprise.rb'
|
|
- 'app/models/enterprise_fee.rb'
|
|
- 'app/models/enterprise_group.rb'
|
|
- 'app/models/enterprise_relationship.rb'
|
|
- 'app/models/exchange.rb'
|
|
- 'app/models/order_cycle.rb'
|
|
- 'app/models/product_import/entry_processor.rb'
|
|
- 'app/models/proxy_order.rb'
|
|
- 'app/models/schedule.rb'
|
|
- 'app/models/spree/line_item.rb'
|
|
- 'app/models/spree/order.rb'
|
|
- 'app/models/spree/payment_method.rb'
|
|
- 'app/models/spree/product.rb'
|
|
- 'app/models/spree/shipping_method.rb'
|
|
- 'app/models/spree/variant.rb'
|
|
- 'app/models/subscription.rb'
|
|
- 'app/queries/payments_requiring_action.rb'
|
|
- 'app/serializers/api/enterprise_shopfront_serializer.rb'
|
|
- 'app/serializers/api/order_serializer.rb'
|
|
- 'lib/open_food_network/enterprise_fee_calculator.rb'
|
|
- 'lib/open_food_network/order_cycle_permissions.rb'
|
|
- 'lib/reporting/reports/products_and_inventory/base.rb'
|
|
- 'lib/tasks/data.rake'
|
|
- 'lib/tasks/data/anonymize_data.rake'
|
|
- 'lib/tasks/data/remove_transient_data.rb'
|
|
- 'spec/services/product_tag_rules_filterer_spec.rb'
|
|
|
|
# Offense count: 8
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: EnforcedStyle.
|
|
# SupportedStyles: exists, where
|
|
Rails/WhereExists:
|
|
Exclude:
|
|
- 'app/controllers/spree/admin/overview_controller.rb'
|
|
- 'app/controllers/spree/admin/tax_rates_controller.rb'
|
|
- 'app/controllers/spree/user_sessions_controller.rb'
|
|
- 'app/models/spree/preferences/store.rb'
|
|
- 'lib/tasks/sample_data/customer_factory.rb'
|
|
- 'lib/tasks/sample_data/group_factory.rb'
|
|
- 'lib/tasks/sample_data/order_cycle_factory.rb'
|
|
- 'lib/tasks/sample_data/taxon_factory.rb'
|
|
|
|
# Offense count: 1
|
|
Security/Open:
|
|
Exclude:
|
|
- 'app/services/image_importer.rb'
|
|
|
|
# Offense count: 9
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Style/ArrayIntersect:
|
|
Exclude:
|
|
- 'app/models/spree/ability.rb'
|
|
- 'app/models/tag_rule/filter_order_cycles.rb'
|
|
- 'app/models/tag_rule/filter_payment_methods.rb'
|
|
- 'app/models/tag_rule/filter_products.rb'
|
|
- 'app/models/tag_rule/filter_shipping_methods.rb'
|
|
- 'app/services/order_syncer.rb'
|
|
- 'lib/open_food_network/tag_rule_applicator.rb'
|
|
- 'spec/support/matchers/select2_matchers.rb'
|
|
|
|
# Offense count: 1
|
|
# This cop supports safe autocorrection (--autocorrect).
|
|
# Configuration parameters: AllowOnConstant, AllowOnSelfClass.
|
|
Style/CaseEquality:
|
|
Exclude:
|
|
- 'spec/models/spree/payment_spec.rb'
|
|
|
|
# Offense count: 25
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: EnforcedStyle.
|
|
# SupportedStyles: nested, compact
|
|
Style/ClassAndModuleChildren:
|
|
Exclude:
|
|
- 'app/models/calculator/flat_percent_per_item.rb'
|
|
- 'app/models/tag_rule/filter_order_cycles.rb'
|
|
- 'app/models/tag_rule/filter_payment_methods.rb'
|
|
- 'app/models/tag_rule/filter_shipping_methods.rb'
|
|
- 'app/serializers/api/address_serializer.rb'
|
|
- 'app/serializers/api/country_serializer.rb'
|
|
- 'app/serializers/api/currency_config_serializer.rb'
|
|
- 'app/serializers/api/current_order_serializer.rb'
|
|
- 'app/serializers/api/enterprise_serializer.rb'
|
|
- 'app/serializers/api/id_name_serializer.rb'
|
|
- 'app/serializers/api/id_serializer.rb'
|
|
- 'app/serializers/api/image_serializer.rb'
|
|
- 'app/serializers/api/line_item_serializer.rb'
|
|
- 'app/serializers/api/payment_method_serializer.rb'
|
|
- 'app/serializers/api/product_serializer.rb'
|
|
- 'app/serializers/api/property_serializer.rb'
|
|
- 'app/serializers/api/shipping_method_serializer.rb'
|
|
- 'app/serializers/api/state_serializer.rb'
|
|
- 'app/serializers/api/taxon_serializer.rb'
|
|
- 'app/serializers/api/variant_serializer.rb'
|
|
- 'lib/open_food_network/locking.rb'
|
|
- 'spec/controllers/spree/admin/base_controller_spec.rb'
|
|
- 'spec/models/spree/payment_method_spec.rb'
|
|
|
|
# Offense count: 2
|
|
# This cop supports safe autocorrection (--autocorrect).
|
|
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
|
|
# SupportedStyles: annotated, template, unannotated
|
|
# AllowedMethods: redirect
|
|
Style/FormatStringToken:
|
|
EnforcedStyle: unannotated
|
|
|
|
# Offense count: 1
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: EnforcedStyle.
|
|
# SupportedStyles: always, always_true, never
|
|
Style/FrozenStringLiteralComment:
|
|
Exclude:
|
|
- '.simplecov'
|
|
|
|
# Offense count: 6
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Style/GlobalStdStream:
|
|
Exclude:
|
|
- 'lib/tasks/data.rake'
|
|
- 'lib/tasks/missing_payments.rake'
|
|
- 'lib/tasks/sample_data/logging.rb'
|
|
- 'lib/tasks/subscriptions/debug.rake'
|
|
- 'lib/tasks/subscriptions/test.rake'
|
|
|
|
# Offense count: 12
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: AllowSplatArgument.
|
|
Style/HashConversion:
|
|
Exclude:
|
|
- 'app/controllers/admin/column_preferences_controller.rb'
|
|
- 'app/controllers/admin/variant_overrides_controller.rb'
|
|
- 'app/controllers/spree/admin/products_controller.rb'
|
|
- 'app/models/order_cycle.rb'
|
|
- 'app/models/product_import/product_importer.rb'
|
|
- 'app/models/spree/shipping_method.rb'
|
|
- 'app/serializers/api/admin/exchange_serializer.rb'
|
|
- 'app/services/variants_stock_levels.rb'
|
|
- 'spec/controllers/admin/inventory_items_controller_spec.rb'
|
|
- 'spec/controllers/admin/variant_overrides_controller_spec.rb'
|
|
|
|
# Offense count: 1
|
|
# Configuration parameters: MinBranchesCount.
|
|
Style/HashLikeCase:
|
|
Exclude:
|
|
- 'app/models/enterprise.rb'
|
|
|
|
# Offense count: 4
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Style/MapToHash:
|
|
Exclude:
|
|
- 'lib/reporting/report_query_template.rb'
|
|
- 'lib/reporting/report_row_builder.rb'
|
|
- 'lib/reporting/reports/enterprise_fee_summary/fee_summary.rb'
|
|
- 'lib/tasks/sample_data/user_factory.rb'
|
|
|
|
# Offense count: 3
|
|
Style/MissingRespondToMissing:
|
|
Exclude:
|
|
- 'app/helpers/application_helper.rb'
|
|
- 'app/models/spree/gateway.rb'
|
|
- 'app/models/spree/preferences/configuration.rb'
|
|
|
|
# Offense count: 22
|
|
# This cop supports safe autocorrection (--autocorrect).
|
|
Style/NestedModifier:
|
|
Exclude:
|
|
- 'spec/controllers/admin/subscriptions_controller_spec.rb'
|
|
- 'spec/controllers/line_items_controller_spec.rb'
|
|
- 'spec/controllers/spree/admin/orders_controller_spec.rb'
|
|
- 'spec/controllers/spree/orders_controller_spec.rb'
|
|
- 'spec/factories/order_factory.rb'
|
|
- 'spec/models/proxy_order_spec.rb'
|
|
- 'spec/models/spree/line_item_spec.rb'
|
|
- 'spec/services/place_proxy_order_spec.rb'
|
|
- 'spec/system/admin/payments_stripe_spec.rb'
|
|
- 'spec/system/admin/reports_spec.rb'
|
|
|
|
# Offense count: 38
|
|
Style/OpenStructUse:
|
|
Exclude:
|
|
- 'app/helpers/injection_helper.rb'
|
|
- 'app/models/spree/shipment.rb'
|
|
- 'lib/open_food_network/enterprise_fee_calculator.rb'
|
|
- 'lib/reporting/report_row_builder.rb'
|
|
- 'lib/reporting/report_rows_builder.rb'
|
|
- 'spec/lib/reports/report_renderer_spec.rb'
|
|
- 'spec/lib/reports/report_spec.rb'
|
|
- 'spec/lib/reports/users_and_enterprises_report_spec.rb'
|
|
- 'spec/serializers/api/enterprise_serializer_spec.rb'
|
|
|
|
# Offense count: 15
|
|
# Configuration parameters: AllowedMethods.
|
|
# AllowedMethods: respond_to_missing?
|
|
Style/OptionalBooleanParameter:
|
|
Exclude:
|
|
- 'app/controllers/admin/subscriptions_controller.rb'
|
|
- 'app/mailers/spree/order_mailer.rb'
|
|
- 'app/models/concerns/calculated_adjustments.rb'
|
|
- 'app/models/enterprise_relationship.rb'
|
|
- 'app/models/product_import/entry_processor.rb'
|
|
- 'app/models/spree/order_contents.rb'
|
|
- 'app/models/spree/shipment.rb'
|
|
- 'engines/order_management/app/services/order_management/stock/estimator.rb'
|
|
- 'lib/spree/core/controller_helpers/order.rb'
|
|
- 'spec/support/request/web_helper.rb'
|
|
|
|
# Offense count: 1
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: EnforcedStyle.
|
|
# SupportedStyles: short, verbose
|
|
Style/PreferredHashMethods:
|
|
Exclude:
|
|
- 'app/controllers/api/v0/shipments_controller.rb'
|
|
|
|
# Offense count: 3
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: Methods.
|
|
Style/RedundantArgument:
|
|
Exclude:
|
|
- 'engines/dfc_provider/app/services/authorization_control.rb'
|
|
- 'spec/support/query_counter.rb'
|
|
|
|
# Offense count: 1
|
|
# This cop supports safe autocorrection (--autocorrect).
|
|
Style/RedundantDoubleSplatHashBraces:
|
|
Exclude:
|
|
- 'spec/system/support/cuprite_setup.rb'
|
|
|
|
# Offense count: 1
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: AllowComments.
|
|
Style/RedundantInitialize:
|
|
Exclude:
|
|
- 'spec/models/spree/gateway_spec.rb'
|
|
|
|
# Offense count: 2
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Style/RedundantInterpolation:
|
|
Exclude:
|
|
- 'lib/tasks/karma.rake'
|
|
- 'spec/base_spec_helper.rb'
|
|
|
|
# Offense count: 2
|
|
# This cop supports safe autocorrection (--autocorrect).
|
|
Style/RedundantRegexpArgument:
|
|
Exclude:
|
|
- 'app/models/spree/shipping_method.rb'
|
|
- 'lib/spree/i18n.rb'
|
|
|
|
# Offense count: 5
|
|
# This cop supports safe autocorrection (--autocorrect).
|
|
# Configuration parameters: AllowMultipleReturnValues.
|
|
Style/RedundantReturn:
|
|
Exclude:
|
|
- 'app/models/product_import/entry_validator.rb'
|
|
- 'app/models/spree/stock/availability_validator.rb'
|
|
- 'lib/reporting/reports/enterprise_fee_summary/summarizer.rb'
|
|
- 'lib/stripe/authorize_response_patcher.rb'
|
|
- 'lib/tasks/data.rake'
|
|
|
|
# Offense count: 1
|
|
# This cop supports safe autocorrection (--autocorrect).
|
|
Style/RedundantSelf:
|
|
Exclude:
|
|
- 'app/models/spree/order.rb'
|
|
|
|
# Offense count: 4
|
|
# This cop supports safe autocorrection (--autocorrect).
|
|
Style/RedundantStringEscape:
|
|
Exclude:
|
|
- 'app/models/spree/calculator.rb'
|
|
- 'spec/controllers/spree/admin/shipping_methods_controller_spec.rb'
|
|
- 'spec/system/admin/enterprise_fees_spec.rb'
|
|
|
|
# Offense count: 19
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
Style/ReturnNilInPredicateMethodDefinition:
|
|
Exclude:
|
|
- 'app/models/order_cycle.rb'
|
|
- 'app/serializers/api/admin/customer_serializer.rb'
|
|
- 'engines/order_management/app/services/order_management/subscriptions/validator.rb'
|
|
|
|
# Offense count: 204
|
|
Style/Send:
|
|
Exclude:
|
|
- 'spec/controllers/admin/subscriptions_controller_spec.rb'
|
|
- 'spec/controllers/payment_gateways/paypal_controller_spec.rb'
|
|
- 'spec/controllers/spree/admin/base_controller_spec.rb'
|
|
- 'spec/controllers/spree/orders_controller_spec.rb'
|
|
- 'spec/helpers/order_cycles_helper_spec.rb'
|
|
- 'spec/jobs/subscription_confirm_job_spec.rb'
|
|
- 'spec/jobs/subscription_placement_job_spec.rb'
|
|
- 'spec/lib/open_food_network/address_finder_spec.rb'
|
|
- 'spec/lib/open_food_network/enterprise_fee_applicator_spec.rb'
|
|
- 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb'
|
|
- 'spec/lib/open_food_network/order_cycle_form_applicator_spec.rb'
|
|
- 'spec/lib/open_food_network/permissions_spec.rb'
|
|
- 'spec/lib/open_food_network/tag_rule_applicator_spec.rb'
|
|
- 'spec/lib/reports/xero_invoices_report_spec.rb'
|
|
- 'spec/lib/stripe/webhook_handler_spec.rb'
|
|
- 'spec/models/calculator/weight_spec.rb'
|
|
- 'spec/models/enterprise_spec.rb'
|
|
- 'spec/models/exchange_spec.rb'
|
|
- 'spec/models/spree/order_inventory_spec.rb'
|
|
- 'spec/models/spree/payment_spec.rb'
|
|
- 'spec/models/spree/return_authorization_spec.rb'
|
|
- 'spec/models/tag_rule/filter_order_cycles_spec.rb'
|
|
- 'spec/models/tag_rule/filter_payment_methods_spec.rb'
|
|
- 'spec/models/tag_rule/filter_products_spec.rb'
|
|
- 'spec/models/tag_rule/filter_shipping_methods_spec.rb'
|
|
- 'spec/services/cart_service_spec.rb'
|
|
- 'spec/services/products_renderer_spec.rb'
|
|
- 'spec/services/variant_units/option_value_namer_spec.rb'
|
|
- 'spec/support/localized_number_helper.rb'
|
|
|
|
# Offense count: 4
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
Style/SlicingWithRange:
|
|
Exclude:
|
|
- 'app/helpers/spree/admin/navigation_helper.rb'
|
|
- 'app/services/embedded_page_service.rb'
|
|
- 'engines/order_management/app/services/order_management/subscriptions/validator.rb'
|
|
- 'lib/discourse/single_sign_on.rb'
|
|
|
|
# Offense count: 28
|
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
# Configuration parameters: Mode.
|
|
Style/StringConcatenation:
|
|
Exclude:
|
|
- 'app/controllers/admin/stripe_connect_settings_controller.rb'
|
|
- 'app/helpers/discourse_helper.rb'
|
|
- 'app/helpers/enterprises_helper.rb'
|
|
- 'app/helpers/spree/admin/base_helper.rb'
|
|
- 'app/mailers/spree/user_mailer.rb'
|
|
- 'app/models/enterprise.rb'
|
|
- 'app/models/spree/credit_card.rb'
|
|
- 'app/models/spree/payment_method.rb'
|
|
- 'app/serializers/api/cached_enterprise_serializer.rb'
|
|
- 'app/serializers/api/enterprise_shopfront_list_serializer.rb'
|
|
- 'app/services/embedded_page_service.rb'
|
|
- 'app/services/products_renderer.rb'
|
|
- 'lib/spree/api/controller_setup.rb'
|
|
- 'lib/spree/core/environment_extension.rb'
|
|
- 'spec/models/spree/line_item_spec.rb'
|
|
- 'spec/models/spree/product_spec.rb'
|
|
- 'spec/services/embedded_page_service_spec.rb'
|
|
- 'spec/support/api_helper.rb'
|
|
- 'spec/support/features/datepicker_helper.rb'
|
|
- 'spec/system/admin/products_spec.rb'
|