From cbfdfb43e3eefd8579094bdd87e552c05077eadc Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Tue, 16 Jan 2018 09:44:41 +0100 Subject: [PATCH] Enable HashSyntax rubocop cop with symbol style This enforces the ruby 1.9 symbol hash syntax and consistency among the style of the keys. # bad {:a => 1, :b => 2} {c: 2, 'd' => 3} # should just use hash rockets # good {a: 1, b: 2} {:c => 3, 'd' => 4} The .rubocop-todo.yml is also updated to keep track of the existing violations. --- .rubocop.yml | 4 + .rubocop_todo.yml | 568 +++++++++++++++++++++++++++++++++++++--------- 2 files changed, 460 insertions(+), 112 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 2e664e7c2b..a5e9806dbd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -27,6 +27,10 @@ Style/Documentation: Style/StringLiterals: Enabled: false +Style/HashSyntax: + Enabled: true + EnforcedStyle: ruby19_no_mixed_keys + Layout/MultilineMethodCallIndentation: Enabled: true EnforcedStyle: indented diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 136580b472..6598d0d940 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,12 +1,12 @@ # This configuration was generated by -# `rubocop --auto-gen-config --exclude-limit 100` -# on 2017-08-25 14:27:48 +1000 using RuboCop version 0.49.1. +# `rubocop --auto-gen-config --exclude-limit 1400` +# on 2018-01-20 12:46:57 +0100 using RuboCop version 0.49.1. # 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: 35 +# Offense count: 37 # Cop supports --auto-correct. # Configuration parameters: Include, TreatCommentsAsGroupSeparators. # Include: **/Gemfile, **/gems.rb @@ -59,7 +59,7 @@ Layout/AlignHash: - 'spec/models/spree/shipping_method_spec.rb' - 'spec/models/spree/variant_spec.rb' -# Offense count: 43 +# Offense count: 44 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # SupportedStyles: with_first_parameter, with_fixed_indentation @@ -138,10 +138,147 @@ Layout/ElseAlignment: - 'app/serializers/api/admin/order_cycle_serializer.rb' - 'lib/open_food_network/sales_tax_report.rb' -# Offense count: 215 +# Offense count: 209 # Cop supports --auto-correct. Layout/EmptyLines: - Enabled: false + Exclude: + - 'Guardfile' + - 'app/controllers/admin/enterprise_fees_controller.rb' + - 'app/controllers/admin/order_cycles_controller.rb' + - 'app/controllers/admin/producer_properties_controller.rb' + - 'app/controllers/admin/tag_rules_controller.rb' + - 'app/controllers/admin/variant_overrides_controller.rb' + - 'app/controllers/api/statuses_controller.rb' + - 'app/controllers/spree/admin/adjustments_controller_decorator.rb' + - 'app/controllers/spree/admin/base_controller_decorator.rb' + - 'app/controllers/spree/admin/general_settings_controller_decorator.rb' + - 'app/controllers/spree/admin/orders_controller_decorator.rb' + - 'app/controllers/spree/admin/payments_controller_decorator.rb' + - 'app/controllers/spree/admin/products_controller_decorator.rb' + - 'app/controllers/spree/admin/variants_controller_decorator.rb' + - 'app/controllers/spree/orders_controller_decorator.rb' + - 'app/helpers/angular_form_helper.rb' + - 'app/helpers/injection_helper.rb' + - 'app/helpers/spree/admin/base_helper_decorator.rb' + - 'app/jobs/finalize_account_invoices.rb' + - 'app/jobs/products_cache_integrity_checker_job.rb' + - 'app/jobs/refresh_products_cache_job.rb' + - 'app/mailers/producer_mailer.rb' + - 'app/models/coordinator_fee.rb' + - 'app/models/enterprise_fee.rb' + - 'app/models/enterprise_relationship.rb' + - 'app/models/exchange.rb' + - 'app/models/exchange_fee.rb' + - 'app/models/inventory_item.rb' + - 'app/models/open_food_network/calculator/weight.rb' + - 'app/models/order_cycle.rb' + - 'app/models/producer_property.rb' + - 'app/models/product_distribution.rb' + - 'app/models/spree/calculator_decorator.rb' + - 'app/models/spree/classification_decorator.rb' + - 'app/models/spree/gateway/migs.rb' + - 'app/models/spree/gateway/pin.rb' + - 'app/models/spree/image_decorator.rb' + - 'app/models/spree/line_item_decorator.rb' + - 'app/models/spree/option_type_decorator.rb' + - 'app/models/spree/option_value_decorator.rb' + - 'app/models/spree/order_populator_decorator.rb' + - 'app/models/spree/payment_decorator.rb' + - 'app/models/spree/preference_decorator.rb' + - 'app/models/spree/preferences/file_configuration.rb' + - 'app/models/spree/price_decorator.rb' + - 'app/models/spree/product_decorator.rb' + - 'app/models/spree/product_property_decorator.rb' + - 'app/models/spree/property_decorator.rb' + - 'app/models/spree/shipping_method_decorator.rb' + - 'app/models/spree/tax_rate_decorator.rb' + - 'app/models/spree/taxon_decorator.rb' + - 'app/models/spree/variant_decorator.rb' + - 'app/serializers/api/enterprise_serializer.rb' + - 'lib/open_food_network/cached_products_renderer.rb' + - 'lib/open_food_network/enterprise_fee_applicator.rb' + - 'lib/open_food_network/enterprise_fee_calculator.rb' + - 'lib/open_food_network/enterprise_issue_validator.rb' + - 'lib/open_food_network/integrity_checker.rb' + - 'lib/open_food_network/last_used_address.rb' + - 'lib/open_food_network/lettuce_share_report.rb' + - 'lib/open_food_network/option_value_namer.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/open_food_network/products_cache.rb' + - 'lib/open_food_network/products_cache_integrity_checker.rb' + - 'lib/open_food_network/products_cache_refreshment.rb' + - 'lib/open_food_network/products_renderer.rb' + - 'lib/open_food_network/property_merge.rb' + - 'lib/open_food_network/reports/bulk_coop_report.rb' + - 'lib/open_food_network/sales_tax_report.rb' + - 'lib/open_food_network/scope_product_to_hub.rb' + - 'lib/open_food_network/scope_variant_to_hub.rb' + - 'lib/open_food_network/xero_invoices_report.rb' + - 'lib/spree/core/controller_helpers/order_decorator.rb' + - 'lib/tasks/cache.rake' + - 'lib/tasks/dev.rake' + - 'lib/tasks/enterprises.rake' + - 'lib/tasks/users.rake' + - 'spec/archive/features/consumer/checkout_spec.rb' + - 'spec/controllers/admin/column_preferences_controller_spec.rb' + - 'spec/controllers/admin/enterprises_controller_spec.rb' + - 'spec/controllers/admin/order_cycles_controller_spec.rb' + - 'spec/controllers/enterprises_controller_spec.rb' + - 'spec/controllers/shop_controller_spec.rb' + - 'spec/controllers/spree/admin/payments_controller_spec.rb' + - 'spec/controllers/spree/checkout_controller_spec.rb' + - 'spec/controllers/spree/orders_controller_spec.rb' + - 'spec/factories.rb' + - 'spec/features/admin/bulk_product_update_spec.rb' + - 'spec/features/admin/enterprise_relationships_spec.rb' + - 'spec/features/admin/enterprise_roles_spec.rb' + - 'spec/features/admin/enterprises/index_spec.rb' + - 'spec/features/admin/enterprises_spec.rb' + - 'spec/features/admin/order_cycles_spec.rb' + - 'spec/features/admin/orders_spec.rb' + - 'spec/features/admin/payment_method_spec.rb' + - 'spec/features/admin/product_import_spec.rb' + - 'spec/features/admin/products_spec.rb' + - 'spec/features/admin/reports_spec.rb' + - 'spec/features/admin/shipping_methods_spec.rb' + - 'spec/features/admin/variant_overrides_spec.rb' + - 'spec/features/admin/variants_spec.rb' + - 'spec/features/consumer/producers_spec.rb' + - 'spec/features/consumer/registration_spec.rb' + - 'spec/features/consumer/shopping/variant_overrides_spec.rb' + - 'spec/features/consumer/shops_spec.rb' + - 'spec/helpers/checkout_helper_spec.rb' + - 'spec/jobs/finalize_account_invoices_spec.rb' + - 'spec/jobs/heartbeat_job_spec.rb' + - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' + - 'spec/lib/open_food_network/option_value_namer_spec.rb' + - 'spec/lib/open_food_network/order_and_distributor_report_spec.rb' + - 'spec/lib/open_food_network/order_cycle_form_applicator_spec.rb' + - 'spec/lib/open_food_network/order_cycle_management_report_spec.rb' + - 'spec/lib/open_food_network/order_cycle_permissions_spec.rb' + - 'spec/lib/open_food_network/products_cache_spec.rb' + - 'spec/lib/open_food_network/reports/report_spec.rb' + - 'spec/lib/open_food_network/tag_rule_applicator_spec.rb' + - 'spec/mailers/producer_mailer_spec.rb' + - 'spec/models/enterprise_fee_spec.rb' + - 'spec/models/enterprise_spec.rb' + - 'spec/models/model_set_spec.rb' + - 'spec/models/product_distribution_spec.rb' + - 'spec/models/spree/adjustment_spec.rb' + - 'spec/models/spree/order_populator_spec.rb' + - 'spec/models/spree/order_spec.rb' + - 'spec/models/spree/product_spec.rb' + - 'spec/models/spree/shipping_method_spec.rb' + - 'spec/models/spree/variant_spec.rb' + - 'spec/models/variant_override_spec.rb' + - 'spec/serializers/admin/exchange_serializer_spec.rb' + - 'spec/serializers/admin/for_order_cycle/enterprise_serializer_spec.rb' + - 'spec/serializers/admin/for_order_cycle/supplied_product_serializer_spec.rb' + - 'spec/serializers/credit_card_serializer_spec.rb' + - 'spec/support/delayed_job_helper.rb' + - 'spec/support/matchers/table_matchers.rb' # Offense count: 6 # Cop supports --auto-correct. @@ -153,20 +290,18 @@ Layout/EmptyLinesAroundAccessModifier: - 'spec/helpers/products_helper_spec.rb' - 'spec/support/request/web_helper.rb' -# Offense count: 70 +# Offense count: 66 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: empty_lines, no_empty_lines Layout/EmptyLinesAroundBlockBody: Exclude: - 'app/controllers/spree/admin/orders_controller_decorator.rb' - - 'app/controllers/spree/admin/payments_controller_decorator.rb' - 'app/controllers/spree/admin/reports_controller_decorator.rb' - 'app/controllers/spree/admin/variants_controller_decorator.rb' - 'app/controllers/spree/api/orders_controller_decorator.rb' - 'app/controllers/spree/api/products_controller_decorator.rb' - 'app/controllers/spree/checkout_controller_decorator.rb' - - 'app/models/spree/adjustment_decorator.rb' - 'app/models/spree/calculator/default_tax_decorator.rb' - 'app/models/spree/calculator_decorator.rb' - 'app/models/spree/money_decorator.rb' @@ -178,7 +313,6 @@ Layout/EmptyLinesAroundBlockBody: - 'spec/controllers/admin/tag_rules_controller_spec.rb' - 'spec/controllers/cart_controller_spec.rb' - 'spec/controllers/enterprise_confirmations_controller_spec.rb' - - 'spec/controllers/spree/admin/line_items_controller_spec.rb' - 'spec/controllers/spree/admin/orders_controller_spec.rb' - 'spec/controllers/spree/admin/reports_controller_spec.rb' - 'spec/controllers/spree/api/orders_controller_spec.rb' @@ -212,7 +346,6 @@ Layout/EmptyLinesAroundBlockBody: - 'spec/models/tag_rule/filter_shipping_methods_spec.rb' - 'spec/serializers/admin/for_order_cycle/enterprise_serializer_spec.rb' - 'spec/serializers/admin/for_order_cycle/supplied_product_serializer_spec.rb' - - 'spec/serializers/variant_serializer_spec.rb' - 'spec/support/matchers/delegate_matchers.rb' - 'spec/support/matchers/select2_matchers.rb' - 'spec/support/matchers/table_matchers.rb' @@ -269,7 +402,7 @@ Layout/EmptyLinesAroundMethodBody: - 'app/serializers/api/product_serializer.rb' - 'lib/open_food_network/orders_and_fulfillments_report.rb' -# Offense count: 12 +# Offense count: 11 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines @@ -277,7 +410,6 @@ Layout/EmptyLinesAroundModuleBody: Exclude: - 'app/helpers/add_to_cart_helper.rb' - 'app/helpers/groups_helper.rb' - - 'app/helpers/spree/admin/base_helper_decorator.rb' - 'lib/open_food_network/column_preference_defaults.rb' - 'lib/open_food_network/group_buy_report.rb' - 'lib/open_food_network/order_cycle_form_applicator.rb' @@ -294,7 +426,6 @@ Layout/ExtraSpacing: Exclude: - 'app/controllers/admin/enterprises_controller.rb' - 'app/controllers/checkout_controller.rb' - - 'app/controllers/spree/admin/payments_controller_decorator.rb' - 'app/helpers/admin/injection_helper.rb' - 'app/models/enterprise.rb' - 'app/models/spree/classification_decorator.rb' @@ -314,7 +445,6 @@ Layout/ExtraSpacing: - 'spec/features/admin/orders_spec.rb' - 'spec/features/admin/product_import_spec.rb' - 'spec/features/admin/reports_spec.rb' - - 'spec/features/admin/variant_overrides_spec.rb' - 'spec/features/consumer/groups_spec.rb' - 'spec/features/consumer/shopping/shopping_spec.rb' - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' @@ -329,6 +459,7 @@ Layout/ExtraSpacing: - 'spec/models/variant_override_spec.rb' - 'spec/serializers/admin/for_order_cycle/enterprise_serializer_spec.rb' - 'spec/serializers/admin/for_order_cycle/supplied_product_serializer_spec.rb' + - 'spec/spec_helper.rb' - 'spec/support/request/web_helper.rb' # Offense count: 2 @@ -340,7 +471,7 @@ Layout/FirstParameterIndentation: - 'lib/open_food_network/permissions.rb' - 'spec/serializers/variant_serializer_spec.rb' -# Offense count: 4 +# Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: SupportedStyles, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_brackets @@ -400,7 +531,7 @@ Layout/IndentationConsistency: - 'spec/models/spree/line_item_spec.rb' - 'spec/models/spree/product_spec.rb' -# Offense count: 18 +# Offense count: 19 # Cop supports --auto-correct. # Configuration parameters: Width, IgnoredPatterns. Layout/IndentationWidth: @@ -413,6 +544,7 @@ Layout/IndentationWidth: - 'app/serializers/api/admin/for_order_cycle/supplied_product_serializer.rb' - 'app/serializers/api/admin/order_cycle_serializer.rb' - 'lib/discourse/single_sign_on.rb' + - 'serializer.rb' - 'spec/features/consumer/shopping/variant_overrides_spec.rb' - 'spec/helpers/admin/business_model_configuration_helper_spec.rb' - 'spec/helpers/groups_helper_spec.rb' @@ -421,19 +553,12 @@ Layout/IndentationWidth: - 'spec/lib/spree/product_filters_spec.rb' - 'spec/models/enterprise_spec.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Layout/InitialIndentation: - Exclude: - - 'spec/models/spree/calculator/flat_percent_item_total_spec.rb' - -# Offense count: 80 +# Offense count: 78 # Cop supports --auto-correct. Layout/LeadingCommentSpace: Exclude: - 'Gemfile' - 'Guardfile' - - 'app/controllers/spree/admin/products_controller_decorator.rb' - 'app/models/billable_period.rb' - 'app/models/content_configuration.rb' - 'app/models/product_importer.rb' @@ -520,12 +645,15 @@ Layout/MultilineMethodCallBraceLayout: - 'lib/open_food_network/products_renderer.rb' - 'spec/lib/open_food_network/products_and_inventory_report_spec.rb' -# Offense count: 1 +# Offense count: 7 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # SupportedStyles: aligned, indented, indented_relative_to_receiver Layout/MultilineMethodCallIndentation: Exclude: + - 'spec/controllers/spree/admin/payments_controller_spec.rb' + - 'spec/lib/open_food_network/cached_products_renderer_spec.rb' + - 'spec/requests/checkout/paypal_spec.rb' - 'spec/serializers/variant_serializer_spec.rb' # Offense count: 33 @@ -600,7 +728,7 @@ Layout/SpaceAfterSemicolon: - 'spec/controllers/spree/admin/base_controller_spec.rb' - 'spec/models/enterprise_spec.rb' -# Offense count: 67 +# Offense count: 65 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: space, no_space @@ -613,7 +741,6 @@ Layout/SpaceAroundEqualsInParameterDefault: - 'app/helpers/order_cycles_helper.rb' - 'app/helpers/spree/base_helper_decorator.rb' - 'app/models/column_preference_set.rb' - - 'app/models/enterprise_fee.rb' - 'app/models/enterprise_fee_set.rb' - 'app/models/enterprise_relationship.rb' - 'app/models/enterprise_set.rb' @@ -626,7 +753,6 @@ Layout/SpaceAroundEqualsInParameterDefault: - 'app/models/spree/payment_method_decorator.rb' - 'app/models/spree/preferences/file_configuration.rb' - 'app/models/spree/product_set.rb' - - 'app/models/spree/shipping_method_decorator.rb' - 'app/models/spree/taxon_decorator.rb' - 'app/models/variant_override_set.rb' - 'lib/discourse/single_sign_on.rb' @@ -648,7 +774,7 @@ Layout/SpaceAroundEqualsInParameterDefault: - 'spec/support/request/distribution_helper.rb' - 'spec/support/request/web_helper.rb' -# Offense count: 60 +# Offense count: 61 # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment. Layout/SpaceAroundOperators: @@ -679,6 +805,7 @@ Layout/SpaceAroundOperators: - 'spec/lib/open_food_network/order_grouper_spec.rb' - 'spec/lib/stripe/account_connector_spec.rb' - 'spec/models/calculator/weight_spec.rb' + - 'spec/spec_helper.rb' - 'spec/support/cancan_helper.rb' - 'spec/support/seeds.rb' @@ -692,13 +819,14 @@ Layout/SpaceBeforeComma: - 'spec/features/admin/bulk_order_management_spec.rb' - 'spec/features/admin/bulk_product_update_spec.rb' -# Offense count: 4 +# Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment. Layout/SpaceBeforeFirstArg: Exclude: - 'spec/factories.rb' - 'spec/features/admin/bulk_product_update_spec.rb' + - 'spec/features/admin/product_import_spec.rb' - 'spec/models/enterprise_fee_spec.rb' # Offense count: 1 @@ -795,13 +923,124 @@ Layout/SpaceInsideBrackets: - 'spec/lib/open_food_network/users_and_enterprises_report_spec.rb' - 'spec/performance/orders_controller_spec.rb' -# Offense count: 766 +# Offense count: 782 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces. # SupportedStyles: space, no_space, compact # SupportedStylesForEmptyBraces: space, no_space Layout/SpaceInsideHashLiteralBraces: - Enabled: false + Exclude: + - 'app/controllers/admin/cache_settings_controller.rb' + - 'app/controllers/admin/contents_controller.rb' + - 'app/controllers/admin/enterprise_relationships_controller.rb' + - 'app/controllers/admin/enterprise_roles_controller.rb' + - 'app/controllers/admin/order_cycles_controller.rb' + - 'app/controllers/api/statuses_controller.rb' + - 'app/controllers/checkout_controller.rb' + - 'app/controllers/spree/admin/line_items_controller_decorator.rb' + - 'app/controllers/spree/admin/products_controller_decorator.rb' + - 'app/controllers/spree/admin/reports_controller_decorator.rb' + - 'app/controllers/spree/admin/search_controller_decorator.rb' + - 'app/controllers/spree/orders_controller_decorator.rb' + - 'app/helpers/admin/business_model_configuration_helper.rb' + - 'app/helpers/admin/injection_helper.rb' + - 'app/helpers/angular_form_builder.rb' + - 'app/helpers/injection_helper.rb' + - 'app/helpers/order_cycles_helper.rb' + - 'app/helpers/serializer_helper.rb' + - 'app/helpers/spree/admin/base_helper_decorator.rb' + - 'app/helpers/spree/admin/navigation_helper_decorator.rb' + - 'app/jobs/update_billable_periods.rb' + - 'app/mailers/spree/base_mailer_decorator.rb' + - 'app/models/billable_period.rb' + - 'app/models/enterprise.rb' + - 'app/models/enterprise_group.rb' + - 'app/models/enterprise_relationship.rb' + - 'app/models/producer_property.rb' + - 'app/models/product_importer.rb' + - 'app/models/spree/gateway/stripe_connect.rb' + - 'app/models/spree/order_populator_decorator.rb' + - 'app/models/spree/product_decorator.rb' + - 'app/models/spree/property_decorator.rb' + - 'app/models/spree/shipping_method_decorator.rb' + - 'app/overrides/add_capture_order_shortcut.rb' + - 'app/serializers/api/admin/enterprise_fee_serializer.rb' + - 'app/serializers/api/admin/order_cycle_serializer.rb' + - 'lib/open_food_network/feature_toggle.rb' + - 'lib/open_food_network/option_value_namer.rb' + - 'lib/open_food_network/order_cycle_form_applicator.rb' + - 'lib/open_food_network/order_cycle_management_report.rb' + - 'lib/open_food_network/reports/rule.rb' + - 'lib/open_food_network/sales_tax_report.rb' + - 'lib/open_food_network/variant_and_line_item_naming.rb' + - 'lib/open_food_network/xero_invoices_report.rb' + - 'lib/tasks/users.rake' + - 'spec/controllers/admin/accounts_and_billing_settings_controller_spec.rb' + - 'spec/controllers/admin/business_model_configuration_controller_spec.rb' + - 'spec/controllers/admin/enterprises_controller_spec.rb' + - 'spec/controllers/admin/order_cycles_controller_spec.rb' + - 'spec/controllers/api/enterprises_controller_spec.rb' + - 'spec/controllers/api/statuses_controller_spec.rb' + - 'spec/controllers/cart_controller_spec.rb' + - 'spec/controllers/checkout_controller_spec.rb' + - 'spec/controllers/enterprises_controller_spec.rb' + - 'spec/controllers/shop_controller_spec.rb' + - 'spec/controllers/spree/admin/adjustments_controller_spec.rb' + - 'spec/controllers/spree/admin/payments_controller_spec.rb' + - 'spec/controllers/spree/admin/products_controller_spec.rb' + - 'spec/controllers/spree/admin/reports_controller_spec.rb' + - 'spec/controllers/spree/api/line_items_controller_spec.rb' + - 'spec/controllers/spree/api/products_controller_spec.rb' + - 'spec/controllers/spree/api/variants_controller_spec.rb' + - 'spec/controllers/spree/orders_controller_spec.rb' + - 'spec/controllers/spree/user_sessions_controller_spec.rb' + - 'spec/controllers/user_passwords_controller_spec.rb' + - 'spec/controllers/user_registrations_controller_spec.rb' + - 'spec/factories.rb' + - 'spec/features/admin/accounts_and_billing_settings_spec.rb' + - 'spec/features/admin/image_settings_spec.rb' + - 'spec/features/admin/products_spec.rb' + - 'spec/features/admin/reports_spec.rb' + - 'spec/features/consumer/shopping/checkout_spec.rb' + - 'spec/helpers/checkout_helper_spec.rb' + - 'spec/helpers/i18n_helper_spec.rb' + - 'spec/helpers/order_cycles_helper_spec.rb' + - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' + - 'spec/lib/open_food_network/feature_toggle_spec.rb' + - 'spec/lib/open_food_network/lettuce_share_report_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/reports/report_spec.rb' + - 'spec/lib/open_food_network/reports/rule_spec.rb' + - 'spec/lib/open_food_network/tag_rule_applicator_spec.rb' + - 'spec/lib/open_food_network/xero_invoices_report_spec.rb' + - 'spec/lib/stripe/account_connector_spec.rb' + - 'spec/models/customer_spec.rb' + - 'spec/models/enterprise_fee_spec.rb' + - 'spec/models/enterprise_relationship_spec.rb' + - 'spec/models/exchange_spec.rb' + - 'spec/models/model_set_spec.rb' + - 'spec/models/product_distribution_spec.rb' + - 'spec/models/spree/ability_spec.rb' + - 'spec/models/spree/gateway/stripe_connect_spec.rb' + - 'spec/models/spree/image_spec.rb' + - 'spec/models/spree/order_populator_spec.rb' + - 'spec/models/spree/order_spec.rb' + - 'spec/models/spree/product_spec.rb' + - 'spec/models/spree/shipping_method_spec.rb' + - 'spec/models/spree/taxon_spec.rb' + - 'spec/models/spree/variant_spec.rb' + - 'spec/models/tag_rule/discount_order_spec.rb' + - 'spec/models/variant_override_spec.rb' + - 'spec/performance/orders_controller_spec.rb' + - 'spec/requests/checkout/failed_checkout_spec.rb' + - 'spec/requests/checkout/stripe_connect_spec.rb' + - 'spec/serializers/enterprise_serializer_spec.rb' + - 'spec/spec_helper.rb' + - 'spec/support/cancan_helper.rb' + - 'spec/support/request/authentication_workflow.rb' + - 'spec/support/request/shop_workflow.rb' + - 'spec/support/seeds.rb' # Offense count: 10 # Cop supports --auto-correct. @@ -822,7 +1061,7 @@ Layout/Tab: - 'spec/lib/spree/product_filters_spec.rb' - 'spec/models/spree/line_item_spec.rb' -# Offense count: 42 +# Offense count: 28 # Cop supports --auto-correct. Layout/TrailingWhitespace: Exclude: @@ -835,17 +1074,14 @@ Layout/TrailingWhitespace: - 'app/views/json/_producer.rabl' - 'app/views/json/partials/_producer.rabl' - 'lib/tasks/dev.rake' - - 'spec/controllers/spree/store_controller_spec.rb' - 'spec/features/admin/enterprise_user_spec.rb' - 'spec/lib/open_food_network/group_buy_report_spec.rb' - - 'spec/lib/open_food_network/option_value_namer_spec.rb' - 'spec/lib/open_food_network/order_grouper_spec.rb' - 'spec/serializers/admin/enterprise_serializer_spec.rb' - - 'spec/serializers/variant_serializer_spec.rb' - 'spec/support/request/menu_helper.rb' - 'spec/views/json/producers.json.rabl_spec.rb' -# Offense count: 6 +# Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyleAlignWith, SupportedStylesAlignWith. # SupportedStylesAlignWith: either, start_of_block, start_of_line @@ -853,7 +1089,6 @@ Lint/BlockAlignment: Exclude: - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' - 'spec/models/enterprise_spec.rb' - - 'spec/models/spree/calculator/flat_percent_item_total_spec.rb' - 'spec/models/spree/line_item_spec.rb' - 'spec/models/spree/product_spec.rb' @@ -1007,24 +1242,22 @@ Lint/UselessAccessModifier: - 'lib/open_food_network/reports/bulk_coop_report.rb' - 'spec/lib/open_food_network/reports/report_spec.rb' -# Offense count: 341 +# Offense count: 325 Lint/Void: Exclude: - 'app/serializers/api/enterprise_serializer.rb' - 'spec/archive/features/consumer/checkout_spec.rb' + - 'spec/controllers/admin/bulk_line_items_controller_spec.rb' - 'spec/controllers/api/order_cycles_controller_spec.rb' - - 'spec/controllers/base_controller_spec.rb' - 'spec/controllers/cart_controller_spec.rb' - 'spec/controllers/checkout_controller_spec.rb' - 'spec/controllers/enterprises_controller_spec.rb' - 'spec/controllers/shop_controller_spec.rb' - 'spec/controllers/spree/admin/adjustments_controller_spec.rb' - - 'spec/controllers/spree/admin/line_items_controller_spec.rb' - 'spec/controllers/spree/admin/orders_controller_spec.rb' - 'spec/controllers/spree/admin/variants_controller_spec.rb' - 'spec/controllers/spree/api/products_controller_spec.rb' - 'spec/controllers/spree/api/variants_controller_spec.rb' - - 'spec/controllers/spree/checkout_controller_spec.rb' - 'spec/controllers/spree/orders_controller_spec.rb' - 'spec/controllers/user_passwords_controller_spec.rb' - 'spec/controllers/user_registrations_controller_spec.rb' @@ -1063,7 +1296,6 @@ Lint/Void: - 'spec/models/enterprise_spec.rb' - 'spec/models/exchange_spec.rb' - 'spec/models/order_cycle_spec.rb' - - 'spec/models/product_distribution_spec.rb' - 'spec/models/spree/adjustment_spec.rb' - 'spec/models/spree/line_item_spec.rb' - 'spec/models/spree/order_populator_spec.rb' @@ -1076,10 +1308,10 @@ Lint/Void: - 'spec/serializers/enterprise_serializer_spec.rb' - 'spec/support/request/web_helper.rb' -# Offense count: 747 +# Offense count: 793 # Configuration parameters: CountComments, ExcludedMethods. Metrics/BlockLength: - Max: 711 + Max: 672 # Offense count: 1 Performance/Caller: @@ -1199,7 +1431,7 @@ Rails/HasAndBelongsToMany: - 'app/models/spree/line_item_decorator.rb' - 'app/models/spree/payment_method_decorator.rb' -# Offense count: 10 +# Offense count: 11 Rails/OutputSafety: Exclude: - 'app/controllers/spree/admin/reports_controller_decorator.rb' @@ -1207,6 +1439,7 @@ Rails/OutputSafety: - 'app/helpers/spree/reports_helper.rb' - 'app/serializers/api/product_serializer.rb' - 'lib/spree/money_decorator.rb' + - 'spec/features/admin/orders_spec.rb' # Offense count: 6 # Cop supports --auto-correct. @@ -1297,7 +1530,7 @@ Rails/Validation: - 'app/models/spree/variant_decorator.rb' - 'app/models/variant_override.rb' -# Offense count: 7 +# Offense count: 8 Style/AccessorMethodName: Exclude: - 'app/models/product_importer.rb' @@ -1306,7 +1539,7 @@ Style/AccessorMethodName: - 'spec/support/request/shop_workflow.rb' - 'spec/support/request/web_helper.rb' -# Offense count: 34 +# Offense count: 35 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: always, conditionals @@ -1322,6 +1555,7 @@ Style/AndOr: - 'app/models/product_importer.rb' - 'app/models/spreadsheet_entry.rb' - 'app/models/spree/adjustment_decorator.rb' + - 'app/models/spree/order_decorator.rb' - 'app/models/spree/product_set.rb' - 'app/views/json/partials/_enterprise.rabl' - 'lib/spree/core/controller_helpers/respond_with_decorator.rb' @@ -1463,7 +1697,6 @@ Style/ClassAndModuleChildren: - 'app/serializers/api/admin/order_cycle_serializer.rb' - 'app/serializers/api/admin/order_serializer.rb' - 'app/serializers/api/admin/payment_method/base_serializer.rb' - - 'app/serializers/api/admin/payment_method/payment_method_serializer.rb' - 'app/serializers/api/admin/payment_method/stripe_serializer.rb' - 'app/serializers/api/admin/product_serializer.rb' - 'app/serializers/api/admin/shipping_method_serializer.rb' @@ -1498,6 +1731,7 @@ Style/ClassAndModuleChildren: - 'lib/open_food_network/reports/report.rb' - 'lib/open_food_network/reports/row.rb' - 'lib/open_food_network/reports/rule.rb' + - 'serializer.rb' - 'spec/controllers/spree/admin/base_controller_spec.rb' - 'spec/lib/open_food_network/reports/report_spec.rb' - 'spec/lib/open_food_network/reports/row_spec.rb' @@ -1526,7 +1760,7 @@ Style/ColonMethodCall: - 'app/controllers/spree/admin/products_controller_decorator.rb' - 'lib/discourse/single_sign_on.rb' -# Offense count: 13 +# Offense count: 12 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions. # SupportedStyles: assign_to_condition, assign_inside_condition @@ -1537,7 +1771,6 @@ Style/ConditionalAssignment: - 'app/controllers/spree/admin/payment_methods_controller_decorator.rb' - 'app/controllers/spree/admin/reports_controller_decorator.rb' - 'app/controllers/spree/admin/search_controller_decorator.rb' - - 'app/helpers/injection_helper.rb' - 'app/helpers/spree/admin/orders_helper_decorator.rb' - 'app/models/spree/calculator/flexi_rate_decorator.rb' - 'app/models/spree/calculator/per_item_decorator.rb' @@ -1569,14 +1802,13 @@ Style/EmptyLiteral: - 'app/helpers/checkout_helper.rb' - 'app/models/spree/order_decorator.rb' -# Offense count: 7 +# Offense count: 6 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: compact, expanded Style/EmptyMethod: Exclude: - 'app/controllers/admin/variant_overrides_controller.rb' - - 'app/controllers/checkout_controller.rb' - 'app/controllers/home_controller.rb' - 'app/controllers/map_controller.rb' - 'app/controllers/producers_controller.rb' @@ -1597,7 +1829,7 @@ Style/FileName: Style/FormatStringToken: EnforcedStyle: template -# Offense count: 89 +# Offense count: 87 # Configuration parameters: MinBodyLength. Style/GuardClause: Exclude: @@ -1636,7 +1868,6 @@ Style/GuardClause: - 'app/models/spree/user_decorator.rb' - 'lib/discourse/single_sign_on.rb' - 'lib/open_food_network/accounts_and_billing_settings_validator.rb' - - 'lib/open_food_network/cached_products_renderer.rb' - 'lib/open_food_network/order_cycle_form_applicator.rb' - 'lib/open_food_network/products_cache.rb' - 'lib/open_food_network/products_cache_refreshment.rb' @@ -1645,18 +1876,178 @@ Style/GuardClause: - 'lib/open_food_network/variant_and_line_item_naming.rb' - 'lib/spree/core/controller_helpers/order_decorator.rb' - 'lib/spree/core/controller_helpers/respond_with_decorator.rb' - - 'lib/tasks/karma.rake' - 'spec/features/admin/orders_spec.rb' - 'spec/support/delayed_job_helper.rb' - 'spec/support/request/distribution_helper.rb' - 'spec/support/request/shop_workflow.rb' -# Offense count: 1255 +# Offense count: 1233 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys Style/HashSyntax: - Enabled: false + Exclude: + - 'app/controllers/admin/accounts_and_billing_settings_controller.rb' + - 'app/controllers/admin/contents_controller.rb' + - 'app/controllers/admin/enterprise_fees_controller.rb' + - 'app/controllers/admin/enterprises_controller.rb' + - 'app/controllers/admin/order_cycles_controller.rb' + - 'app/controllers/admin/stripe_connect_settings_controller.rb' + - 'app/controllers/admin/tag_rules_controller.rb' + - 'app/controllers/api/enterprises_controller.rb' + - 'app/controllers/checkout_controller.rb' + - 'app/controllers/enterprise_confirmations_controller.rb' + - 'app/controllers/open_food_network/cart_controller.rb' + - 'app/controllers/spree/admin/line_items_controller_decorator.rb' + - 'app/controllers/spree/admin/orders_controller_decorator.rb' + - 'app/controllers/spree/admin/products_controller_decorator.rb' + - 'app/controllers/spree/admin/reports_controller_decorator.rb' + - 'app/controllers/spree/admin/search_controller_decorator.rb' + - 'app/controllers/spree/admin/shipping_methods_controller_decorator.rb' + - 'app/controllers/spree/admin/variants_controller_decorator.rb' + - 'app/controllers/spree/api/products_controller_decorator.rb' + - 'app/controllers/spree/orders_controller_decorator.rb' + - 'app/controllers/spree/paypal_controller_decorator.rb' + - 'app/controllers/spree/store_controller_decorator.rb' + - 'app/controllers/user_passwords_controller.rb' + - 'app/helpers/admin/account_helper.rb' + - 'app/helpers/angular_form_builder.rb' + - 'app/helpers/application_helper.rb' + - 'app/helpers/checkout_helper.rb' + - 'app/helpers/enterprises_helper.rb' + - 'app/helpers/spree/admin/navigation_helper_decorator.rb' + - 'app/helpers/spree/admin/orders_helper_decorator.rb' + - 'app/mailers/enterprise_mailer.rb' + - 'app/mailers/producer_mailer.rb' + - 'app/mailers/spree/order_mailer_decorator.rb' + - 'app/mailers/spree/user_mailer_decorator.rb' + - 'app/models/billable_period.rb' + - 'app/models/calculator/flat_percent_per_item.rb' + - 'app/models/cart.rb' + - 'app/models/enterprise.rb' + - 'app/models/enterprise_fee.rb' + - 'app/models/enterprise_group.rb' + - 'app/models/enterprise_role.rb' + - 'app/models/exchange_variant.rb' + - 'app/models/open_food_network/calculator/weight.rb' + - 'app/models/order_cycle.rb' + - 'app/models/product_distribution.rb' + - 'app/models/product_importer.rb' + - 'app/models/spree/address_decorator.rb' + - 'app/models/spree/adjustment_decorator.rb' + - 'app/models/spree/classification_decorator.rb' + - 'app/models/spree/gateway/migs.rb' + - 'app/models/spree/gateway/pin.rb' + - 'app/models/spree/gateway/stripe_connect.rb' + - 'app/models/spree/gateway_decorator.rb' + - 'app/models/spree/line_item_decorator.rb' + - 'app/models/spree/order_decorator.rb' + - 'app/models/spree/payment_decorator.rb' + - 'app/models/spree/payment_method_decorator.rb' + - 'app/models/spree/product_decorator.rb' + - 'app/models/spree/product_set.rb' + - 'app/models/spree/taxon_decorator.rb' + - 'app/models/spree/user_decorator.rb' + - 'app/overrides/add_capture_order_shortcut.rb' + - 'app/overrides/add_distributor_details_js_to_product.rb' + - 'app/overrides/add_distributor_details_to_product.rb' + - 'app/overrides/add_distributor_to_add_to_cart_form.rb' + - 'app/overrides/add_enterprise_fees_to_admin_configurations_menu.rb' + - 'app/overrides/add_orders_admin_sub_menu.rb' + - 'app/overrides/add_source_to_product.rb' + - 'app/overrides/remove_search_bar.rb' + - 'app/overrides/remove_side_bar.rb' + - 'app/overrides/replace_checkout_payment_button.rb' + - 'app/overrides/replace_order_details_steps_data.rb' + - 'app/overrides/replace_payment_name_with_description.rb' + - 'app/overrides/replace_shipping_address_form_with_distributor_details.rb' + - 'app/overrides/set_auth_token_in_backend.rb' + - 'app/overrides/set_auth_token_in_frontend.rb' + - 'app/presenters/variant_presenter.rb' + - 'app/serializers/api/admin/enterprise_fee_serializer.rb' + - 'app/serializers/api/enterprise_serializer.rb' + - 'app/views/api/order_cycles/bulk_show.v1.rabl' + - 'app/views/json/_order_cycle.rabl' + - 'app/views/json/partials/_hub.rabl' + - 'app/views/spree/admin/variants/search.rabl' + - 'app/views/spree/api/products/bulk_show.v1.rabl' + - 'lib/open_food_network/enterprise_fee_calculator.rb' + - 'lib/open_food_network/order_cycle_form_applicator.rb' + - 'lib/open_food_network/products_cache.rb' + - 'lib/open_food_network/variant_and_line_item_naming.rb' + - 'lib/spree/api/testing_support/helpers_decorator.rb' + - 'lib/spree/api/testing_support/setup.rb' + - 'lib/spree/core/controller_helpers/respond_with_decorator.rb' + - 'lib/spree/money_decorator.rb' + - 'lib/spree/product_filters.rb' + - 'lib/tasks/cache.rake' + - 'lib/tasks/data.rake' + - 'lib/tasks/dev.rake' + - 'lib/tasks/enterprises.rake' + - 'lib/tasks/karma.rake' + - 'spec/archive/features/consumer/checkout_spec.rb' + - 'spec/controllers/admin/bulk_line_items_controller_spec.rb' + - 'spec/controllers/admin/stripe_connect_settings_controller_spec.rb' + - 'spec/controllers/api/enterprises_controller_spec.rb' + - 'spec/controllers/api/order_cycles_controller_spec.rb' + - 'spec/controllers/base_controller_spec.rb' + - 'spec/controllers/cart_controller_spec.rb' + - 'spec/controllers/enterprise_confirmations_controller_spec.rb' + - 'spec/controllers/spree/admin/orders_controller_spec.rb' + - 'spec/controllers/spree/admin/payment_methods_controller_spec.rb' + - 'spec/controllers/spree/admin/payments_controller_spec.rb' + - 'spec/controllers/spree/api/line_items_controller_spec.rb' + - 'spec/controllers/spree/api/products_controller_spec.rb' + - 'spec/controllers/spree/api/variants_controller_spec.rb' + - 'spec/controllers/spree/credit_cards_controller_spec.rb' + - 'spec/controllers/spree/orders_controller_spec.rb' + - 'spec/controllers/spree/user_sessions_controller_spec.rb' + - 'spec/controllers/user_registrations_controller_spec.rb' + - 'spec/factories.rb' + - 'spec/features/admin/bulk_order_management_spec.rb' + - 'spec/features/admin/bulk_product_update_spec.rb' + - 'spec/features/admin/customers_spec.rb' + - 'spec/features/admin/enterprise_fees_spec.rb' + - 'spec/features/admin/enterprise_groups_spec.rb' + - 'spec/features/admin/enterprises_spec.rb' + - 'spec/features/admin/order_cycles_spec.rb' + - 'spec/features/admin/orders_spec.rb' + - 'spec/features/admin/overview_spec.rb' + - 'spec/features/admin/payment_method_spec.rb' + - 'spec/features/admin/products_spec.rb' + - 'spec/features/admin/reports_spec.rb' + - 'spec/features/admin/shipping_methods_spec.rb' + - 'spec/features/admin/variant_overrides_spec.rb' + - 'spec/features/consumer/account/cards_spec.rb' + - 'spec/features/consumer/shopping/products_spec.rb' + - 'spec/features/consumer/shopping/shopping_spec.rb' + - 'spec/lib/open_food_network/group_buy_report_spec.rb' + - 'spec/lib/open_food_network/lettuce_share_report_spec.rb' + - 'spec/lib/open_food_network/order_and_distributor_report_spec.rb' + - 'spec/lib/open_food_network/order_cycle_form_applicator_spec.rb' + - 'spec/lib/open_food_network/order_grouper_spec.rb' + - 'spec/lib/open_food_network/tag_rule_applicator_spec.rb' + - 'spec/mailers/order_mailer_spec.rb' + - 'spec/models/calculator/weight_spec.rb' + - 'spec/models/cart_spec.rb' + - 'spec/models/enterprise_fee_spec.rb' + - 'spec/models/enterprise_spec.rb' + - 'spec/models/exchange_spec.rb' + - 'spec/models/order_cycle_spec.rb' + - 'spec/models/product_distribution_spec.rb' + - 'spec/models/spree/calculator/flat_percent_item_total_spec.rb' + - 'spec/models/spree/calculator/flat_rate_spec.rb' + - 'spec/models/spree/image_spec.rb' + - 'spec/models/spree/order_spec.rb' + - 'spec/models/spree/payment_spec.rb' + - 'spec/models/spree/product_spec.rb' + - 'spec/models/tag_rule/discount_order_spec.rb' + - 'spec/requests/checkout/paypal_spec.rb' + - 'spec/requests/checkout/stripe_connect_spec.rb' + - 'spec/spec_helper.rb' + - 'spec/support/request/authentication_workflow.rb' + - 'spec/support/request/web_helper.rb' + - 'spec/support/seeds.rb' # Offense count: 6 Style/IfInsideElse: @@ -1700,7 +2091,7 @@ Style/MethodCallWithoutArgsParentheses: - 'spec/models/spree/payment_method_spec.rb' - 'spec/support/request/ui_component_helper.rb' -# Offense count: 15 +# Offense count: 14 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline @@ -1714,7 +2105,6 @@ Style/MethodDefParentheses: - 'lib/open_food_network/feature_toggle.rb' - 'lib/open_food_network/group_buy_report.rb' - 'lib/open_food_network/order_and_distributor_report.rb' - - 'lib/tasks/karma.rake' - 'spec/support/request/authentication_workflow.rb' - 'spec/support/request/ui_component_helper.rb' - 'spec/support/request/web_helper.rb' @@ -1749,13 +2139,14 @@ Style/NestedParenthesizedCalls: - 'spec/controllers/shop_controller_spec.rb' - 'spec/lib/open_food_network/users_and_enterprises_report_spec.rb' -# Offense count: 4 +# Offense count: 5 Style/NestedTernaryOperator: Exclude: - 'app/serializers/api/admin/product_serializer.rb' - 'app/serializers/api/admin/variant_serializer.rb' - 'app/views/spree/api/products/bulk_show.v1.rabl' - 'app/views/spree/api/variants/bulk_show.v1.rabl' + - 'serializer.rb' # Offense count: 3 # Cop supports --auto-correct. @@ -1798,7 +2189,7 @@ Style/NumericLiteralPrefix: Style/NumericLiterals: MinDigits: 11 -# Offense count: 16 +# Offense count: 15 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles. # SupportedStyles: predicate, comparison @@ -1808,7 +2199,6 @@ Style/NumericPredicate: - 'app/helpers/admin/business_model_configuration_helper.rb' - 'app/helpers/checkout_helper.rb' - 'app/jobs/update_account_invoices.rb' - - 'app/models/enterprise_fee.rb' - 'app/models/spree/calculator/flexi_rate_decorator.rb' - 'app/models/spree/line_item_decorator.rb' - 'app/models/spree/order_decorator.rb' @@ -1863,7 +2253,7 @@ Style/PredicateName: - 'lib/open_food_network/packing_report.rb' - 'lib/tasks/data.rake' -# Offense count: 5 +# Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: short, verbose @@ -1871,7 +2261,6 @@ Style/PreferredHashMethods: Exclude: - 'app/controllers/spree/orders_controller_decorator.rb' - 'app/models/product_importer.rb' - - 'spec/controllers/spree/admin/line_items_controller_spec.rb' - 'spec/controllers/spree/admin/orders_controller_spec.rb' # Offense count: 18 @@ -2019,51 +2408,7 @@ Style/StructInheritance: Exclude: - 'lib/open_food_network/enterprise_fee_applicator.rb' -# Offense count: 183 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, MinSize, SupportedStyles. -# SupportedStyles: percent, brackets -Style/SymbolArray: - Exclude: - - 'Gemfile' - - 'app/controllers/admin/accounts_and_billing_settings_controller.rb' - - 'app/controllers/admin/business_model_configuration_controller.rb' - - 'app/controllers/admin/contents_controller.rb' - - 'app/controllers/admin/enterprise_fees_controller.rb' - - 'app/controllers/admin/enterprise_groups_controller.rb' - - 'app/controllers/admin/enterprises_controller.rb' - - 'app/controllers/admin/order_cycles_controller.rb' - - 'app/controllers/admin/tag_rules_controller.rb' - - 'app/controllers/admin/variant_overrides_controller.rb' - - 'app/controllers/api/enterprises_controller.rb' - - 'app/controllers/spree/admin/adjustments_controller_decorator.rb' - - 'app/controllers/spree/admin/orders_controller_decorator.rb' - - 'app/controllers/spree/admin/payment_methods_controller_decorator.rb' - - 'app/controllers/spree/admin/products_controller_decorator.rb' - - 'app/controllers/spree/admin/reports_controller_decorator.rb' - - 'app/controllers/spree/admin/shipping_methods_controller_decorator.rb' - - 'app/jobs/update_billable_periods.rb' - - 'app/models/enterprise.rb' - - 'app/models/exchange.rb' - - 'app/models/spree/ability_decorator.rb' - - 'app/models/spree/payment_method_decorator.rb' - - 'lib/discourse/single_sign_on.rb' - - 'lib/open_food_network/paperclippable.rb' - - 'spec/controllers/api/order_cycles_controller_spec.rb' - - 'spec/controllers/spree/admin/line_items_controller_spec.rb' - - 'spec/controllers/spree/admin/orders_controller_spec.rb' - - 'spec/controllers/spree/api/products_controller_spec.rb' - - 'spec/controllers/spree/api/variants_controller_spec.rb' - - 'spec/features/admin/enterprise_relationships_spec.rb' - - 'spec/jobs/update_account_invoices_spec.rb' - - 'spec/lib/open_food_network/permissions_spec.rb' - - 'spec/models/column_preference_spec.rb' - - 'spec/models/enterprise_relationship_spec.rb' - - 'spec/models/enterprise_spec.rb' - - 'spec/models/exchange_spec.rb' - - 'spec/models/spree/ability_spec.rb' - -# Offense count: 96 +# Offense count: 93 # Cop supports --auto-correct. # Configuration parameters: IgnoredMethods. # IgnoredMethods: respond_to, define_method @@ -2087,7 +2432,6 @@ Style/SymbolProc: - 'lib/open_food_network/reports/bulk_coop_supplier_report.rb' - 'lib/spree/product_filters.rb' - 'spec/controllers/api/order_cycles_controller_spec.rb' - - 'spec/controllers/spree/admin/line_items_controller_spec.rb' - 'spec/controllers/spree/admin/orders_controller_spec.rb' - 'spec/controllers/spree/api/products_controller_spec.rb' - 'spec/controllers/spree/api/variants_controller_spec.rb'