diff --git a/.rubocop.yml b/.rubocop.yml index a56ff3b145..d5c6c7800e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -57,6 +57,18 @@ Rails/SkipsModelValidations: # They should be removed or tweaked and moved above as decisions are made # NOTE: Cops which did not fail at the time of writing were removed +Layout/DotPosition: + Enabled: false + StyleGuide: http://relaxed.ruby.style/#styledotposition + +Layout/SpaceBeforeBlockBraces: + Enabled: false + StyleGuide: http://relaxed.ruby.style/#stylespacebeforeblockbraces + +Layout/SpaceInsideParens: + Enabled: false + StyleGuide: http://relaxed.ruby.style/#stylespaceinsideparens + Style/Alias: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylealias @@ -69,10 +81,6 @@ Style/CommentAnnotation: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylecommentannotation -Style/DotPosition: - Enabled: false - StyleGuide: http://relaxed.ruby.style/#styledotposition - Style/DoubleNegation: Enabled: false StyleGuide: http://relaxed.ruby.style/#styledoublenegation @@ -117,14 +125,6 @@ Style/SingleLineMethods: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylesinglelinemethods -Style/SpaceBeforeBlockBraces: - Enabled: false - StyleGuide: http://relaxed.ruby.style/#stylespacebeforeblockbraces - -Style/SpaceInsideParens: - Enabled: false - StyleGuide: http://relaxed.ruby.style/#stylespaceinsideparens - Style/TrailingCommaInArguments: Enabled: false StyleGuide: http://relaxed.ruby.style/#styletrailingcommainarguments diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index e1cd53f9ff..aaef41b82d 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --exclude-limit 100` -# on 2017-06-24 13:07:01 +1000 using RuboCop version 0.48.1. +# on 2017-06-29 08:50:47 +1000 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 @@ -14,6 +14,888 @@ Bundler/OrderedGems: Exclude: - 'Gemfile' +# Offense count: 77 +# Cop supports --auto-correct. +Layout/AlignArray: + Exclude: + - 'app/controllers/admin/contents_controller.rb' + - 'lib/open_food_network/bulk_coop_report.rb' + - 'lib/open_food_network/customers_report.rb' + - 'lib/open_food_network/order_and_distributor_report.rb' + - 'lib/open_food_network/orders_and_fulfillments_report.rb' + - 'lib/open_food_network/packing_report.rb' + - 'spec/controllers/spree/orders_controller_spec.rb' + - 'spec/lib/open_food_network/order_and_distributor_report_spec.rb' + - 'spec/lib/open_food_network/order_grouper_spec.rb' + +# Offense count: 133 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedHashRocketStyle, SupportedHashRocketStyles, EnforcedColonStyle, SupportedColonStyles, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles. +# SupportedHashRocketStyles: key, separator, table +# SupportedColonStyles: key, separator, table +# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit +Layout/AlignHash: + Exclude: + - 'app/overrides/add_capture_order_shortcut.rb' + - 'app/overrides/replace_shipping_address_form_with_distributor_details.rb' + - 'lib/open_food_network/bulk_coop_report.rb' + - 'lib/open_food_network/orders_and_fulfillments_report.rb' + - 'lib/open_food_network/packing_report.rb' + - 'lib/open_food_network/payments_report.rb' + - 'spec/archive/features/consumer/checkout_spec.rb' + - 'spec/factories.rb' + - 'spec/features/admin/bulk_product_update_spec.rb' + - 'spec/features/admin/order_cycles_spec.rb' + - 'spec/features/admin/products_spec.rb' + - 'spec/features/admin/variant_overrides_spec.rb' + - 'spec/lib/open_food_network/customers_report_spec.rb' + - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' + - 'spec/lib/open_food_network/permissions_spec.rb' + - 'spec/lib/open_food_network/products_and_inventory_report_spec.rb' + - 'spec/lib/open_food_network/user_balance_calculator_spec.rb' + - 'spec/models/enterprise_relationship_spec.rb' + - 'spec/models/exchange_spec.rb' + - 'spec/models/order_cycle_spec.rb' + - 'spec/models/spree/shipping_method_spec.rb' + - 'spec/models/spree/variant_spec.rb' + +# Offense count: 42 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: with_first_parameter, with_fixed_indentation +Layout/AlignParameters: + Exclude: + - 'app/controllers/spree/orders_controller_decorator.rb' + - 'app/helpers/injection_helper.rb' + - 'app/models/enterprise.rb' + - 'app/models/enterprise_group.rb' + - 'app/models/enterprise_relationship.rb' + - 'app/models/spree/variant_decorator.rb' + - 'app/serializers/api/address_serializer.rb' + - 'app/serializers/api/enterprise_serializer.rb' + - 'app/serializers/api/shipping_method_serializer.rb' + - 'lib/spree/product_filters.rb' + - 'lib/tasks/dev.rake' + - 'spec/controllers/enterprises_controller_spec.rb' + - 'spec/controllers/shop_controller_spec.rb' + - 'spec/features/admin/enterprise_relationships_spec.rb' + - 'spec/features/consumer/shopping/checkout_spec.rb' + - 'spec/helpers/enterprises_helper_spec.rb' + - 'spec/lib/open_food_network/user_balance_calculator_spec.rb' + - 'spec/support/request/authentication_workflow.rb' + +# Offense count: 41 +# Cop supports --auto-correct. +Layout/BlockEndNewline: + Exclude: + - 'app/models/order_cycle.rb' + - 'app/models/spree/calculator/default_tax_decorator.rb' + - 'app/models/spree/product_decorator.rb' + - 'spec/controllers/admin/column_preferences_controller_spec.rb' + - 'spec/controllers/shop_controller_spec.rb' + - 'spec/features/admin/variant_overrides_spec.rb' + - 'spec/helpers/enterprises_helper_spec.rb' + - 'spec/jobs/update_billable_periods_spec.rb' + - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' + - 'spec/lib/open_food_network/permissions_spec.rb' + - 'spec/lib/open_food_network/user_balance_calculator_spec.rb' + - 'spec/models/order_cycle_spec.rb' + - 'spec/models/spree/product_spec.rb' + - 'spec/models/spree/variant_spec.rb' + - 'spec/serializers/enterprise_serializer_spec.rb' + +# Offense count: 8 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentOneStep, IndentationWidth. +# SupportedStyles: case, end +Layout/CaseIndentation: + Exclude: + - 'app/models/enterprise.rb' + - 'app/models/product_importer.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Layout/ClosingParenthesisIndentation: + Exclude: + - 'app/overrides/add_capture_order_shortcut.rb' + +# Offense count: 8 +# Cop supports --auto-correct. +Layout/CommentIndentation: + Exclude: + - 'Guardfile' + - 'lib/open_food_network/packing_report.rb' + +# Offense count: 8 +# Cop supports --auto-correct. +Layout/ElseAlignment: + Exclude: + - 'app/controllers/admin/order_cycles_controller.rb' + - 'app/controllers/api/order_cycles_controller.rb' + - 'app/serializers/api/admin/for_order_cycle/enterprise_serializer.rb' + - 'app/serializers/api/admin/for_order_cycle/supplied_product_serializer.rb' + - 'app/serializers/api/admin/order_cycle_serializer.rb' + - 'lib/open_food_network/sales_tax_report.rb' + +# Offense count: 223 +# Cop supports --auto-correct. +Layout/EmptyLines: + Enabled: false + +# Offense count: 6 +# Cop supports --auto-correct. +Layout/EmptyLinesAroundAccessModifier: + Exclude: + - 'app/controllers/admin/order_cycles_controller.rb' + - 'app/controllers/spree/admin/shipping_methods_controller_decorator.rb' + - 'app/helpers/angular_form_builder.rb' + - 'spec/helpers/products_helper_spec.rb' + - 'spec/support/request/web_helper.rb' + +# Offense count: 73 +# 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' + - 'app/models/spree/option_value_decorator.rb' + - 'app/models/spree/payment_decorator.rb' + - 'lib/open_food_network/group_buy_report.rb' + - 'lib/spree/money_decorator.rb' + - 'lib/tasks/dev.rake' + - 'lib/tasks/users.rake' + - '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' + - 'spec/controllers/spree/orders_controller_spec.rb' + - 'spec/controllers/user_registrations_controller_spec.rb' + - 'spec/features/admin/caching_spec.rb' + - 'spec/features/admin/orders_spec.rb' + - 'spec/features/admin/reports_spec.rb' + - 'spec/features/admin/variant_overrides_spec.rb' + - 'spec/features/consumer/shopping/shopping_spec.rb' + - 'spec/features/consumer/shopping/variant_overrides_spec.rb' + - 'spec/helpers/admin/business_model_configuration_helper_spec.rb' + - 'spec/helpers/injection_helper_spec.rb' + - 'spec/helpers/shared_helper_spec.rb' + - 'spec/helpers/shop_helper_spec.rb' + - 'spec/helpers/spree/orders_helper_spec.rb' + - 'spec/jobs/update_billable_periods_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_grouper_spec.rb' + - 'spec/lib/open_food_network/referer_parser_spec.rb' + - 'spec/lib/open_food_network/user_balance_calculator_spec.rb' + - 'spec/models/billable_period_spec.rb' + - 'spec/models/cart_spec.rb' + - 'spec/models/product_distribution_spec.rb' + - 'spec/models/spree/ability_spec.rb' + - 'spec/models/spree/product_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/serializers/admin/for_order_cycle/enterprise_serializer_spec.rb' + - 'spec/serializers/admin/for_order_cycle/supplied_product_serializer_spec.rb' + - 'spec/serializers/order_serializer_spec.rb' + - 'spec/serializers/orders_by_distributor_serializer_spec.rb' + - 'spec/support/matchers/delegate_matchers.rb' + - 'spec/support/matchers/select2_matchers.rb' + - 'spec/support/matchers/table_matchers.rb' + +# Offense count: 27 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines +Layout/EmptyLinesAroundClassBody: + Exclude: + - 'app/controllers/admin/account_controller.rb' + - 'app/controllers/admin/cache_settings_controller.rb' + - 'app/controllers/admin/enterprise_fees_controller.rb' + - 'app/controllers/admin/inventory_items_controller.rb' + - 'app/controllers/admin/invoice_settings_controller.rb' + - 'app/controllers/admin/product_import_controller.rb' + - 'app/controllers/admin/tag_rules_controller.rb' + - 'app/controllers/api/enterprises_controller.rb' + - 'app/controllers/application_controller.rb' + - 'app/controllers/home_controller.rb' + - 'app/mailers/producer_mailer.rb' + - 'app/models/coordinator_fee.rb' + - 'app/models/producer_property.rb' + - 'app/models/spree/preferences/file_configuration.rb' + - 'app/serializers/api/admin/enterprise_fee_serializer.rb' + - 'app/serializers/api/admin/index_enterprise_serializer.rb' + - 'app/serializers/api/currency_config_serializer.rb' + - 'app/serializers/api/product_serializer.rb' + - 'lib/discourse/single_sign_on.rb' + - 'lib/open_food_network/distribution_change_validator.rb' + - 'lib/open_food_network/lettuce_share_report.rb' + - 'lib/open_food_network/order_and_distributor_report.rb' + - 'lib/open_food_network/rack_request_blocker.rb' + - 'lib/open_food_network/reports/bulk_coop_report.rb' + +# Offense count: 7 +# Cop supports --auto-correct. +Layout/EmptyLinesAroundExceptionHandlingKeywords: + Exclude: + - 'app/controllers/checkout_controller.rb' + - 'app/controllers/enterprises_controller.rb' + - 'app/controllers/shop_controller.rb' + - 'app/models/spree/adjustment_decorator.rb' + - 'app/models/spree/tax_rate_decorator.rb' + - 'lib/tasks/users.rake' + - 'spec/features/admin/overview_spec.rb' + +# Offense count: 4 +# Cop supports --auto-correct. +Layout/EmptyLinesAroundMethodBody: + Exclude: + - 'app/controllers/checkout_controller.rb' + - 'app/controllers/spree/admin/reports_controller_decorator.rb' + - 'app/serializers/api/product_serializer.rb' + - 'lib/open_food_network/orders_and_fulfillments_report.rb' + +# Offense count: 13 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines +Layout/EmptyLinesAroundModuleBody: + Exclude: + - 'app/helpers/add_to_cart_helper.rb' + - 'app/helpers/groups_helper.rb' + - 'app/helpers/injection_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' + - 'lib/open_food_network/order_grouper.rb' + - 'lib/open_food_network/variant_and_line_item_naming.rb' + - 'spec/models/spree/ability_spec.rb' + - 'spec/support/request/distribution_helper.rb' + - 'spec/support/request/ui_component_helper.rb' + +# Offense count: 54 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. +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' + - 'app/models/spree/product_set.rb' + - 'app/serializers/api/enterprise_serializer.rb' + - 'config.ru' + - 'lib/open_food_network/bulk_coop_report.rb' + - 'lib/open_food_network/option_value_namer.rb' + - 'lib/open_food_network/paperclippable.rb' + - 'lib/open_food_network/variant_and_line_item_naming.rb' + - 'lib/spree/product_filters.rb' + - 'lib/tasks/karma.rake' + - 'spec/controllers/admin/accounts_and_billing_settings_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/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' + - 'spec/lib/open_food_network/reports/rule_spec.rb' + - 'spec/lib/open_food_network/xero_invoices_report_spec.rb' + - 'spec/models/enterprise_fee_spec.rb' + - 'spec/models/enterprise_spec.rb' + - 'spec/models/order_cycle_spec.rb' + - 'spec/models/spree/adjustment_spec.rb' + - 'spec/models/spree/order_spec.rb' + - '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/support/request/web_helper.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses +Layout/FirstParameterIndentation: + Exclude: + - 'lib/open_food_network/permissions.rb' + +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: special_inside_parentheses, consistent, align_brackets +Layout/IndentArray: + Exclude: + - 'lib/open_food_network/users_and_enterprises_report.rb' + - 'spec/features/admin/reports_spec.rb' + - 'spec/lib/open_food_network/products_and_inventory_report_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: IndentationWidth. +Layout/IndentAssignment: + Exclude: + - 'app/controllers/spree/admin/reports_controller_decorator.rb' + +# Offense count: 52 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: special_inside_parentheses, consistent, align_braces +Layout/IndentHash: + Exclude: + - 'app/controllers/admin/accounts_and_billing_settings_controller.rb' + - 'app/controllers/admin/business_model_configuration_controller.rb' + - 'app/controllers/checkout_controller.rb' + - 'app/controllers/spree/admin/search_controller_decorator.rb' + - 'app/jobs/finalize_account_invoices.rb' + - 'app/jobs/update_account_invoices.rb' + - 'app/jobs/update_billable_periods.rb' + - 'app/models/spree/order_decorator.rb' + - 'spec/controllers/admin/accounts_and_billing_settings_controller_spec.rb' + - 'spec/controllers/admin/business_model_configuration_controller_spec.rb' + - 'spec/controllers/admin/order_cycles_controller_spec.rb' + - 'spec/features/admin/accounts_and_billing_settings_spec.rb' + - 'spec/features/admin/business_model_configuration_spec.rb' + - 'spec/features/admin/tax_settings_spec.rb' + - 'spec/lib/open_food_network/order_cycle_form_applicator_spec.rb' + - 'spec/support/request/authentication_workflow.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent +Layout/IndentHeredoc: + Exclude: + - 'app/models/content_configuration.rb' + +# Offense count: 21 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: normal, rails +Layout/IndentationConsistency: + Exclude: + - 'app/controllers/spree/admin/reports_controller_decorator.rb' + - 'lib/open_food_network/permissions.rb' + - 'spec/controllers/admin/order_cycles_controller_spec.rb' + - 'spec/controllers/admin/tag_rules_controller_spec.rb' + - 'spec/features/consumer/shopping/checkout_spec.rb' + - 'spec/helpers/admin/business_model_configuration_helper_spec.rb' + - 'spec/models/spree/line_item_spec.rb' + - 'spec/models/spree/product_spec.rb' + +# Offense count: 20 +# Cop supports --auto-correct. +# Configuration parameters: Width, IgnoredPatterns. +Layout/IndentationWidth: + Exclude: + - 'app/controllers/admin/invoice_settings_controller.rb' + - 'app/controllers/admin/order_cycles_controller.rb' + - 'app/controllers/api/order_cycles_controller.rb' + - 'app/controllers/spree/admin/reports_controller_decorator.rb' + - 'app/models/spree/line_item_decorator.rb' + - 'app/serializers/api/admin/for_order_cycle/enterprise_serializer.rb' + - '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' + - 'lib/open_food_network/last_used_address.rb' + - 'spec/features/consumer/shopping/variant_overrides_spec.rb' + - 'spec/helpers/admin/business_model_configuration_helper_spec.rb' + - 'spec/helpers/groups_helper_spec.rb' + - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' + - 'spec/lib/open_food_network/order_grouper_spec.rb' + - '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 +# 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' + - 'app/models/spreadsheet_entry.rb' + - 'app/models/spree/inventory_unit_decorator.rb' + - 'app/models/spree/taxon_decorator.rb' + - 'app/overrides/add_capture_order_shortcut.rb' + - 'app/serializers/api/address_serializer.rb' + - 'app/serializers/api/enterprise_serializer.rb' + - 'app/serializers/api/product_serializer.rb' + - 'lib/tasks/users.rake' + - 'spec/archive/features/consumer/checkout_spec.rb' + - 'spec/controllers/spree/api/line_items_controller_spec.rb' + - 'spec/factories.rb' + - 'spec/features/admin/products_spec.rb' + - 'spec/features/admin/reports_spec.rb' + - 'spec/features/consumer/shops_spec.rb' + - 'spec/jobs/finalize_account_invoices_spec.rb' + - 'spec/lib/open_food_network/order_and_distributor_report_spec.rb' + - 'spec/lib/open_food_network/order_grouper_spec.rb' + - 'spec/lib/open_food_network/user_balance_calculator_spec.rb' + - 'spec/models/enterprise_spec.rb' + - 'spec/models/spree/order_spec.rb' + - 'spec/spec_helper.rb' + - 'spec/support/cancan_helper.rb' + - 'spec/support/matchers/select2_matchers.rb' + - 'spec/support/request/authentication_workflow.rb' + +# Offense count: 10 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: symmetrical, new_line, same_line +Layout/MultilineArrayBraceLayout: + Exclude: + - 'lib/open_food_network/customers_report.rb' + - 'lib/open_food_network/order_cycle_management_report.rb' + - 'lib/open_food_network/orders_and_fulfillments_report.rb' + - 'lib/open_food_network/packing_report.rb' + - 'lib/open_food_network/xero_invoices_report.rb' + - 'spec/archive/features/consumer/checkout_spec.rb' + +# Offense count: 44 +# Cop supports --auto-correct. +Layout/MultilineBlockLayout: + Exclude: + - 'app/models/spree/calculator/default_tax_decorator.rb' + - 'app/models/spree/product_decorator.rb' + - 'lib/open_food_network/users_and_enterprises_report.rb' + - 'spec/controllers/admin/column_preferences_controller_spec.rb' + - 'spec/controllers/shop_controller_spec.rb' + - 'spec/controllers/spree/orders_controller_spec.rb' + - 'spec/features/admin/variant_overrides_spec.rb' + - 'spec/helpers/enterprises_helper_spec.rb' + - 'spec/jobs/update_billable_periods_spec.rb' + - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' + - 'spec/lib/open_food_network/permissions_spec.rb' + - 'spec/lib/open_food_network/user_balance_calculator_spec.rb' + - 'spec/models/column_preference_spec.rb' + - 'spec/models/order_cycle_spec.rb' + - 'spec/models/spree/product_spec.rb' + - 'spec/models/spree/variant_spec.rb' + - 'spec/serializers/enterprise_serializer_spec.rb' + +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: symmetrical, new_line, same_line +Layout/MultilineHashBraceLayout: + Exclude: + - 'app/controllers/spree/admin/products_controller_decorator.rb' + - 'app/models/billable_period.rb' + - 'lib/spree/product_filters.rb' + - 'spec/controllers/admin/order_cycles_controller_spec.rb' + - 'spec/support/request/authentication_workflow.rb' + +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: symmetrical, new_line, same_line +Layout/MultilineMethodCallBraceLayout: + Exclude: + - 'app/helpers/spree/orders_helper.rb' + - 'app/models/spree/variant_decorator.rb' + - 'app/overrides/add_capture_order_shortcut.rb' + - 'lib/open_food_network/products_renderer.rb' + - 'spec/lib/open_food_network/products_and_inventory_report_spec.rb' + +# Offense count: 191 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: aligned, indented, indented_relative_to_receiver +Layout/MultilineMethodCallIndentation: + Exclude: + - 'app/controllers/admin/order_cycles_controller.rb' + - 'app/controllers/admin/variant_overrides_controller.rb' + - 'app/controllers/api/order_cycles_controller.rb' + - 'app/controllers/base_controller.rb' + - 'app/controllers/checkout_controller.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/api/products_controller_decorator.rb' + - 'app/controllers/spree/orders_controller_decorator.rb' + - 'app/jobs/update_billable_periods.rb' + - 'app/models/column_preference.rb' + - 'app/models/enterprise.rb' + - 'app/models/enterprise_relationship.rb' + - 'app/models/exchange.rb' + - 'app/models/order_cycle.rb' + - 'app/models/product_importer.rb' + - 'app/models/spree/ability_decorator.rb' + - 'app/models/spree/calculator/default_tax_decorator.rb' + - 'app/models/spree/line_item_decorator.rb' + - 'app/models/spree/order_decorator.rb' + - 'app/models/spree/payment_method_decorator.rb' + - 'app/models/spree/product_decorator.rb' + - 'app/models/spree/shipping_method_decorator.rb' + - 'app/models/spree/taxon_decorator.rb' + - 'app/models/spree/user_decorator.rb' + - 'app/models/spree/variant_decorator.rb' + - 'app/serializers/api/admin/exchange_serializer.rb' + - 'lib/open_food_network/lettuce_share_report.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' + - 'spec/controllers/spree/admin/reports_controller_spec.rb' + - 'spec/helpers/order_cycles_helper_spec.rb' + - 'spec/jobs/update_account_invoices_spec.rb' + - 'spec/jobs/update_billable_periods_spec.rb' + - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' + - 'spec/mailers/producer_mailer_spec.rb' + - 'spec/support/matchers/table_matchers.rb' + +# Offense count: 34 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: aligned, indented +Layout/MultilineOperationIndentation: + Exclude: + - 'app/controllers/application_controller.rb' + - 'app/controllers/spree/admin/payment_methods_controller_decorator.rb' + - 'app/controllers/spree/admin/shipping_methods_controller_decorator.rb' + - 'app/helpers/enterprises_helper.rb' + - 'app/models/producer_property.rb' + - 'app/models/product_importer.rb' + - 'app/models/spree/ability_decorator.rb' + - 'app/models/spree/order_decorator.rb' + - 'app/models/spree/product_set.rb' + - 'app/models/variant_override_set.rb' + - 'lib/open_food_network/accounts_and_billing_settings_validator.rb' + - 'lib/open_food_network/order_cycle_permissions.rb' + - 'lib/open_food_network/products_cache_refreshment.rb' + - 'lib/open_food_network/sales_tax_report.rb' + - 'lib/open_food_network/users_and_enterprises_report.rb' + - 'spec/factories.rb' + +# Offense count: 7 +# Cop supports --auto-correct. +Layout/SpaceAfterColon: + Exclude: + - 'spec/features/admin/variants_spec.rb' + - 'spec/features/consumer/account_spec.rb' + - 'spec/models/spree/ability_spec.rb' + - 'spec/models/variant_override_spec.rb' + - 'spec/spec_helper.rb' + +# Offense count: 58 +# Cop supports --auto-correct. +Layout/SpaceAfterComma: + Exclude: + - 'app/controllers/admin/order_cycles_controller.rb' + - 'app/controllers/spree/admin/products_controller_decorator.rb' + - 'app/controllers/spree/admin/reports_controller_decorator.rb' + - 'app/controllers/spree/orders_controller_decorator.rb' + - 'app/models/column_preference.rb' + - 'app/models/product_importer.rb' + - 'lib/discourse/single_sign_on.rb' + - 'lib/open_food_network/accounts_and_billing_settings_validator.rb' + - 'lib/open_food_network/business_model_configuration_validator.rb' + - 'lib/open_food_network/order_and_distributor_report.rb' + - 'lib/open_food_network/order_cycle_form_applicator.rb' + - 'lib/open_food_network/users_and_enterprises_report.rb' + - 'spec/controllers/admin/enterprises_controller_spec.rb' + - 'spec/controllers/admin/variant_overrides_controller_spec.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/variant_overrides_spec.rb' + - 'spec/jobs/update_account_invoices_spec.rb' + - 'spec/lib/open_food_network/group_buy_report_spec.rb' + - 'spec/lib/open_food_network/order_and_distributor_report_spec.rb' + - 'spec/models/content_configuration_spec.rb' + - 'spec/models/spree/order_spec.rb' + - 'spec/models/tag_rule/discount_order_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/spec_helper.rb' + - 'spec/support/cancan_helper.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +Layout/SpaceAfterSemicolon: + Exclude: + - 'spec/controllers/spree/admin/base_controller_spec.rb' + - 'spec/models/enterprise_spec.rb' + +# Offense count: 67 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: space, no_space +Layout/SpaceAroundEqualsInParameterDefault: + Exclude: + - 'app/controllers/spree/admin/base_controller_decorator.rb' + - 'app/helpers/admin/injection_helper.rb' + - 'app/helpers/angular_form_helper.rb' + - 'app/helpers/checkout_helper.rb' + - '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' + - 'app/models/exchange.rb' + - 'app/models/model_set.rb' + - 'app/models/order_cycle_set.rb' + - 'app/models/product_importer.rb' + - 'app/models/spree/calculator/per_item_decorator.rb' + - 'app/models/spree/payment_decorator.rb' + - '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' + - 'lib/open_food_network/accounts_and_billing_settings_validator.rb' + - 'lib/open_food_network/bill_calculator.rb' + - 'lib/open_food_network/business_model_configuration_validator.rb' + - 'lib/open_food_network/enterprise_fee_calculator.rb' + - 'lib/open_food_network/enterprise_issue_validator.rb' + - 'lib/open_food_network/order_cycle_form_applicator.rb' + - 'lib/open_food_network/permissions.rb' + - 'lib/open_food_network/scope_variant_to_hub.rb' + - 'lib/open_food_network/tag_rule_applicator.rb' + - 'lib/open_food_network/xero_invoices_report.rb' + - 'lib/spree/money_decorator.rb' + - 'spec/features/admin/enterprise_relationships_spec.rb' + - 'spec/features/admin/reports_spec.rb' + - 'spec/models/enterprise_spec.rb' + - 'spec/support/matchers/select2_matchers.rb' + - 'spec/support/request/distribution_helper.rb' + - 'spec/support/request/web_helper.rb' + +# Offense count: 58 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment. +Layout/SpaceAroundOperators: + Exclude: + - 'app/controllers/admin/product_import_controller.rb' + - 'app/controllers/checkout_controller.rb' + - 'app/helpers/admin/business_model_configuration_helper.rb' + - 'app/jobs/update_billable_periods.rb' + - 'app/models/product_importer.rb' + - 'app/models/spree/address_decorator.rb' + - 'app/overrides/remove_search_bar.rb' + - 'app/overrides/remove_side_bar.rb' + - 'app/overrides/replace_shipping_address_form_with_distributor_details.rb' + - 'app/serializers/api/enterprise_serializer.rb' + - 'lib/open_food_network/xero_invoices_report.rb' + - 'lib/spree/product_filters.rb' + - 'spec/controllers/admin/enterprises_controller_spec.rb' + - 'spec/controllers/cart_controller_spec.rb' + - 'spec/controllers/spree/orders_controller_spec.rb' + - 'spec/controllers/user_passwords_controller_spec.rb' + - 'spec/factories.rb' + - 'spec/features/admin/bulk_order_management_spec.rb' + - 'spec/features/admin/bulk_product_update_spec.rb' + - 'spec/features/consumer/shopping/checkout_spec.rb' + - 'spec/helpers/checkout_helper_spec.rb' + - 'spec/helpers/order_cycles_helper_spec.rb' + - 'spec/jobs/update_billable_periods_spec.rb' + - 'spec/lib/open_food_network/order_grouper_spec.rb' + - 'spec/models/calculator/weight_spec.rb' + - 'spec/support/cancan_helper.rb' + - 'spec/support/seeds.rb' + +# Offense count: 6 +# Cop supports --auto-correct. +Layout/SpaceBeforeComma: + Exclude: + - 'app/helpers/checkout_helper.rb' + - 'app/models/spree/ability_decorator.rb' + - 'lib/open_food_network/orders_and_fulfillments_report.rb' + - 'spec/features/admin/bulk_order_management_spec.rb' + - 'spec/features/admin/bulk_product_update_spec.rb' + +# Offense count: 4 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment. +Layout/SpaceBeforeFirstArg: + Exclude: + - 'spec/factories.rb' + - 'spec/features/admin/bulk_product_update_spec.rb' + - 'spec/models/enterprise_fee_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Layout/SpaceBeforeSemicolon: + Exclude: + - 'spec/models/enterprise_spec.rb' + +# Offense count: 5 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: require_no_space, require_space +Layout/SpaceInLambdaLiteral: + Exclude: + - 'app/models/spree/product_decorator.rb' + - 'app/models/spree/variant_decorator.rb' + +# Offense count: 194 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters. +# SupportedStyles: space, no_space +# SupportedStylesForEmptyBraces: space, no_space +Layout/SpaceInsideBlockBraces: + Exclude: + - 'app/controllers/spree/admin/payment_methods_controller_decorator.rb' + - 'app/controllers/spree/admin/payments_controller_decorator.rb' + - 'app/controllers/spree/admin/variants_controller_decorator.rb' + - 'app/controllers/spree/orders_controller_decorator.rb' + - 'app/models/column_preference.rb' + - 'app/models/spree/order_decorator.rb' + - 'lib/spree/product_filters.rb' + - 'lib/tasks/dev.rake' + - 'lib/tasks/karma.rake' + - 'spec/archive/features/consumer/checkout_spec.rb' + - 'spec/controllers/admin/accounts_and_billing_settings_controller_spec.rb' + - 'spec/controllers/admin/business_model_configuration_controller_spec.rb' + - 'spec/controllers/admin/inventory_items_controller_spec.rb' + - 'spec/controllers/admin/tag_rules_controller_spec.rb' + - 'spec/controllers/admin/variant_overrides_controller_spec.rb' + - 'spec/controllers/spree/admin/base_controller_spec.rb' + - 'spec/controllers/spree/admin/orders_controller_spec.rb' + - 'spec/controllers/spree/admin/search_controller_spec.rb' + - 'spec/factories.rb' + - 'spec/features/admin/bulk_order_management_spec.rb' + - 'spec/features/admin/customers_spec.rb' + - 'spec/features/admin/tag_rules_spec.rb' + - 'spec/features/consumer/account_spec.rb' + - 'spec/features/consumer/shopping/products_spec.rb' + - 'spec/features/consumer/shops_spec.rb' + - 'spec/helpers/enterprises_helper_spec.rb' + - 'spec/helpers/injection_helper_spec.rb' + - 'spec/helpers/spree/orders_helper_spec.rb' + - 'spec/jobs/finalize_account_invoices_spec.rb' + - 'spec/jobs/update_account_invoices_spec.rb' + - 'spec/jobs/update_billable_periods_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/orders_and_fulfillments_report_spec.rb' + - 'spec/lib/open_food_network/products_renderer_spec.rb' + - 'spec/lib/open_food_network/tag_rule_applicator_spec.rb' + - 'spec/models/column_preference_spec.rb' + - 'spec/models/enterprise_relationship_spec.rb' + - 'spec/models/enterprise_spec.rb' + - 'spec/models/spree/line_item_spec.rb' + - 'spec/models/spree/order_spec.rb' + - 'spec/models/spree/payment_spec.rb' + - 'spec/models/spree/product_spec.rb' + - 'spec/models/spree/user_spec.rb' + - 'spec/models/tag_rule/discount_order_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/orders_by_distributor_serializer_spec.rb' + - 'spec/spec_helper.rb' + - 'spec/support/cancan_helper.rb' + +# Offense count: 140 +# Cop supports --auto-correct. +Layout/SpaceInsideBrackets: + Exclude: + - 'app/controllers/admin/order_cycles_controller.rb' + - 'app/helpers/spree/reports_helper.rb' + - 'app/models/enterprise.rb' + - 'app/serializers/api/admin/exchange_serializer.rb' + - 'lib/open_food_network/bulk_coop_report.rb' + - 'lib/open_food_network/order_and_distributor_report.rb' + - 'lib/open_food_network/orders_and_fulfillments_report.rb' + - 'lib/open_food_network/packing_report.rb' + - 'lib/open_food_network/payments_report.rb' + - 'lib/open_food_network/users_and_enterprises_report.rb' + - 'spec/controllers/admin/variant_overrides_controller_spec.rb' + - 'spec/controllers/cart_controller_spec.rb' + - 'spec/features/admin/reports_spec.rb' + - 'spec/jobs/update_billable_periods_spec.rb' + - 'spec/lib/open_food_network/order_and_distributor_report_spec.rb' + - 'spec/lib/open_food_network/order_grouper_spec.rb' + - 'spec/lib/open_food_network/users_and_enterprises_report_spec.rb' + - 'spec/performance/orders_controller_spec.rb' + +# Offense count: 729 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces. +# SupportedStyles: space, no_space, compact +# SupportedStylesForEmptyBraces: space, no_space +Layout/SpaceInsideHashLiteralBraces: + Enabled: false + +# Offense count: 10 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: space, no_space +Layout/SpaceInsideStringInterpolation: + Exclude: + - 'app/controllers/enterprises_controller.rb' + - 'lib/open_food_network/users_and_enterprises_report.rb' + - 'spec/support/request/web_helper.rb' + +# Offense count: 6 +# Cop supports --auto-correct. +Layout/Tab: + Exclude: + - 'app/controllers/admin/invoice_settings_controller.rb' + - 'app/models/spree/line_item_decorator.rb' + - 'spec/lib/spree/product_filters_spec.rb' + - 'spec/models/spree/line_item_spec.rb' + +# Offense count: 32 +# Cop supports --auto-correct. +Layout/TrailingWhitespace: + Exclude: + - 'app/models/distributor_shipping_method.rb' + - 'app/models/product_importer.rb' + - 'app/models/spree/money_decorator.rb' + - 'app/serializers/api/image_serializer.rb' + - 'app/serializers/api/shipping_method_serializer.rb' + - 'app/views/json/_current_order.rabl' + - 'app/views/json/_enterprises.rabl' + - 'app/views/json/_producer.rabl' + - 'app/views/json/partials/_producer.rabl' + - 'lib/open_food_network/group_buy_report.rb' + - '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/support/request/menu_helper.rb' + - 'spec/views/json/producers.json.rabl_spec.rb' + # Offense count: 8 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyleAlignWith, SupportedStylesAlignWith. @@ -84,6 +966,11 @@ Lint/NonLocalExitFromIterator: Exclude: - 'app/models/product_importer.rb' +# Offense count: 1 +Lint/ScriptPermission: + Exclude: + - 'Rakefile' + # Offense count: 5 Lint/ShadowingOuterLocalVariable: Exclude: @@ -176,14 +1063,19 @@ Lint/UselessAccessModifier: # Offense count: 340 Lint/Void: Exclude: - - app/serializers/api/enterprise_serializer.rb - - spec/**/* + - 'app/serializers/api/enterprise_serializer.rb' + - 'spec/**/*' # Offense count: 706 # Configuration parameters: CountComments, ExcludedMethods. Metrics/BlockLength: Max: 711 +# Offense count: 1 +Performance/Caller: + Exclude: + - 'app/controllers/application_controller.rb' + # Offense count: 2 # Cop supports --auto-correct. Performance/CompareWithBlock: @@ -404,76 +1296,6 @@ Style/AccessorMethodName: - 'app/models/spree/order_decorator.rb' - 'spec/support/request/shop_workflow.rb' -# Offense count: 77 -# Cop supports --auto-correct. -Style/AlignArray: - Exclude: - - 'app/controllers/admin/contents_controller.rb' - - 'lib/open_food_network/bulk_coop_report.rb' - - 'lib/open_food_network/customers_report.rb' - - 'lib/open_food_network/order_and_distributor_report.rb' - - 'lib/open_food_network/orders_and_fulfillments_report.rb' - - 'lib/open_food_network/packing_report.rb' - - 'spec/controllers/spree/orders_controller_spec.rb' - - 'spec/lib/open_food_network/order_and_distributor_report_spec.rb' - - 'spec/lib/open_food_network/order_grouper_spec.rb' - -# Offense count: 133 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedHashRocketStyle, SupportedHashRocketStyles, EnforcedColonStyle, SupportedColonStyles, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles. -# SupportedHashRocketStyles: key, separator, table -# SupportedColonStyles: key, separator, table -# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit -Style/AlignHash: - Exclude: - - 'app/overrides/add_capture_order_shortcut.rb' - - 'app/overrides/replace_shipping_address_form_with_distributor_details.rb' - - 'lib/open_food_network/bulk_coop_report.rb' - - 'lib/open_food_network/orders_and_fulfillments_report.rb' - - 'lib/open_food_network/packing_report.rb' - - 'lib/open_food_network/payments_report.rb' - - 'spec/archive/features/consumer/checkout_spec.rb' - - 'spec/factories.rb' - - 'spec/features/admin/bulk_product_update_spec.rb' - - 'spec/features/admin/order_cycles_spec.rb' - - 'spec/features/admin/products_spec.rb' - - 'spec/features/admin/variant_overrides_spec.rb' - - 'spec/lib/open_food_network/customers_report_spec.rb' - - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' - - 'spec/lib/open_food_network/permissions_spec.rb' - - 'spec/lib/open_food_network/products_and_inventory_report_spec.rb' - - 'spec/lib/open_food_network/user_balance_calculator_spec.rb' - - 'spec/models/enterprise_relationship_spec.rb' - - 'spec/models/exchange_spec.rb' - - 'spec/models/order_cycle_spec.rb' - - 'spec/models/spree/shipping_method_spec.rb' - - 'spec/models/spree/variant_spec.rb' - -# Offense count: 42 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: with_first_parameter, with_fixed_indentation -Style/AlignParameters: - Exclude: - - 'app/controllers/spree/orders_controller_decorator.rb' - - 'app/helpers/injection_helper.rb' - - 'app/models/enterprise.rb' - - 'app/models/enterprise_group.rb' - - 'app/models/enterprise_relationship.rb' - - 'app/models/spree/variant_decorator.rb' - - 'app/serializers/api/address_serializer.rb' - - 'app/serializers/api/enterprise_serializer.rb' - - 'app/serializers/api/shipping_method_serializer.rb' - - 'lib/spree/product_filters.rb' - - 'lib/tasks/dev.rake' - - 'spec/controllers/enterprises_controller_spec.rb' - - 'spec/controllers/shop_controller_spec.rb' - - 'spec/features/admin/enterprise_relationships_spec.rb' - - 'spec/features/consumer/shopping/checkout_spec.rb' - - 'spec/helpers/enterprises_helper_spec.rb' - - 'spec/lib/open_food_network/user_balance_calculator_spec.rb' - - 'spec/support/request/authentication_workflow.rb' - # Offense count: 35 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. @@ -504,26 +1326,6 @@ Style/BarePercentLiterals: - 'spec/features/admin/variants_spec.rb' - 'spec/support/request/web_helper.rb' -# Offense count: 41 -# Cop supports --auto-correct. -Style/BlockEndNewline: - Exclude: - - 'app/models/order_cycle.rb' - - 'app/models/spree/calculator/default_tax_decorator.rb' - - 'app/models/spree/product_decorator.rb' - - 'spec/controllers/admin/column_preferences_controller_spec.rb' - - 'spec/controllers/shop_controller_spec.rb' - - 'spec/features/admin/variant_overrides_spec.rb' - - 'spec/helpers/enterprises_helper_spec.rb' - - 'spec/jobs/update_billable_periods_spec.rb' - - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' - - 'spec/lib/open_food_network/permissions_spec.rb' - - 'spec/lib/open_food_network/user_balance_calculator_spec.rb' - - 'spec/models/order_cycle_spec.rb' - - 'spec/models/spree/product_spec.rb' - - 'spec/models/spree/variant_spec.rb' - - 'spec/serializers/enterprise_serializer_spec.rb' - # Offense count: 209 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. @@ -606,15 +1408,6 @@ Style/CaseEquality: - 'app/helpers/angular_form_helper.rb' - 'spec/models/spree/payment_spec.rb' -# Offense count: 8 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentOneStep, IndentationWidth. -# SupportedStyles: case, end -Style/CaseIndentation: - Exclude: - - 'app/models/enterprise.rb' - - 'app/models/product_importer.rb' - # Offense count: 86 # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: nested, compact @@ -714,12 +1507,6 @@ Style/ClassVars: Exclude: - 'lib/open_food_network/rack_request_blocker.rb' -# Offense count: 2 -# Cop supports --auto-correct. -Style/ClosingParenthesisIndentation: - Exclude: - - 'app/overrides/add_capture_order_shortcut.rb' - # Offense count: 4 # Cop supports --auto-correct. Style/ColonMethodCall: @@ -729,13 +1516,6 @@ Style/ColonMethodCall: - 'app/controllers/spree/admin/products_controller_decorator.rb' - 'lib/discourse/single_sign_on.rb' -# Offense count: 8 -# Cop supports --auto-correct. -Style/CommentIndentation: - Exclude: - - 'Guardfile' - - 'lib/open_food_network/packing_report.rb' - # Offense count: 13 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions. @@ -763,17 +1543,6 @@ Style/EachWithObject: - 'lib/open_food_network/enterprise_fee_calculator.rb' - 'lib/open_food_network/products_renderer.rb' -# Offense count: 8 -# Cop supports --auto-correct. -Style/ElseAlignment: - Exclude: - - 'app/controllers/admin/order_cycles_controller.rb' - - 'app/controllers/api/order_cycles_controller.rb' - - 'app/serializers/api/admin/for_order_cycle/enterprise_serializer.rb' - - 'app/serializers/api/admin/for_order_cycle/supplied_product_serializer.rb' - - 'app/serializers/api/admin/order_cycle_serializer.rb' - - 'lib/open_food_network/sales_tax_report.rb' - # Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. @@ -783,158 +1552,6 @@ Style/EmptyElse: - 'app/models/spreadsheet_entry.rb' - 'app/serializers/api/admin/basic_order_cycle_serializer.rb' -# Offense count: 223 -# Cop supports --auto-correct. -Style/EmptyLines: - Enabled: false - -# Offense count: 6 -# Cop supports --auto-correct. -Style/EmptyLinesAroundAccessModifier: - Exclude: - - 'app/controllers/admin/order_cycles_controller.rb' - - 'app/controllers/spree/admin/shipping_methods_controller_decorator.rb' - - 'app/helpers/angular_form_builder.rb' - - 'spec/helpers/products_helper_spec.rb' - - 'spec/support/request/web_helper.rb' - -# Offense count: 73 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: empty_lines, no_empty_lines -Style/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' - - 'app/models/spree/option_value_decorator.rb' - - 'app/models/spree/payment_decorator.rb' - - 'lib/open_food_network/group_buy_report.rb' - - 'lib/spree/money_decorator.rb' - - 'lib/tasks/dev.rake' - - 'lib/tasks/users.rake' - - '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' - - 'spec/controllers/spree/orders_controller_spec.rb' - - 'spec/controllers/user_registrations_controller_spec.rb' - - 'spec/features/admin/caching_spec.rb' - - 'spec/features/admin/orders_spec.rb' - - 'spec/features/admin/reports_spec.rb' - - 'spec/features/admin/variant_overrides_spec.rb' - - 'spec/features/consumer/shopping/shopping_spec.rb' - - 'spec/features/consumer/shopping/variant_overrides_spec.rb' - - 'spec/helpers/admin/business_model_configuration_helper_spec.rb' - - 'spec/helpers/injection_helper_spec.rb' - - 'spec/helpers/shared_helper_spec.rb' - - 'spec/helpers/shop_helper_spec.rb' - - 'spec/helpers/spree/orders_helper_spec.rb' - - 'spec/jobs/update_billable_periods_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_grouper_spec.rb' - - 'spec/lib/open_food_network/referer_parser_spec.rb' - - 'spec/lib/open_food_network/user_balance_calculator_spec.rb' - - 'spec/models/billable_period_spec.rb' - - 'spec/models/cart_spec.rb' - - 'spec/models/product_distribution_spec.rb' - - 'spec/models/spree/ability_spec.rb' - - 'spec/models/spree/product_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/serializers/admin/for_order_cycle/enterprise_serializer_spec.rb' - - 'spec/serializers/admin/for_order_cycle/supplied_product_serializer_spec.rb' - - 'spec/serializers/order_serializer_spec.rb' - - 'spec/serializers/orders_by_distributor_serializer_spec.rb' - - 'spec/support/matchers/delegate_matchers.rb' - - 'spec/support/matchers/select2_matchers.rb' - - 'spec/support/matchers/table_matchers.rb' - -# Offense count: 27 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines -Style/EmptyLinesAroundClassBody: - Exclude: - - 'app/controllers/admin/account_controller.rb' - - 'app/controllers/admin/cache_settings_controller.rb' - - 'app/controllers/admin/enterprise_fees_controller.rb' - - 'app/controllers/admin/inventory_items_controller.rb' - - 'app/controllers/admin/invoice_settings_controller.rb' - - 'app/controllers/admin/product_import_controller.rb' - - 'app/controllers/admin/tag_rules_controller.rb' - - 'app/controllers/api/enterprises_controller.rb' - - 'app/controllers/application_controller.rb' - - 'app/controllers/home_controller.rb' - - 'app/mailers/producer_mailer.rb' - - 'app/models/coordinator_fee.rb' - - 'app/models/producer_property.rb' - - 'app/models/spree/preferences/file_configuration.rb' - - 'app/serializers/api/admin/enterprise_fee_serializer.rb' - - 'app/serializers/api/admin/index_enterprise_serializer.rb' - - 'app/serializers/api/currency_config_serializer.rb' - - 'app/serializers/api/product_serializer.rb' - - 'lib/discourse/single_sign_on.rb' - - 'lib/open_food_network/distribution_change_validator.rb' - - 'lib/open_food_network/lettuce_share_report.rb' - - 'lib/open_food_network/order_and_distributor_report.rb' - - 'lib/open_food_network/rack_request_blocker.rb' - - 'lib/open_food_network/reports/bulk_coop_report.rb' - -# Offense count: 7 -# Cop supports --auto-correct. -Style/EmptyLinesAroundExceptionHandlingKeywords: - Exclude: - - 'app/controllers/checkout_controller.rb' - - 'app/controllers/enterprises_controller.rb' - - 'app/controllers/shop_controller.rb' - - 'app/models/spree/adjustment_decorator.rb' - - 'app/models/spree/tax_rate_decorator.rb' - - 'lib/tasks/users.rake' - - 'spec/features/admin/overview_spec.rb' - -# Offense count: 4 -# Cop supports --auto-correct. -Style/EmptyLinesAroundMethodBody: - Exclude: - - 'app/controllers/checkout_controller.rb' - - 'app/controllers/spree/admin/reports_controller_decorator.rb' - - 'app/serializers/api/product_serializer.rb' - - 'lib/open_food_network/orders_and_fulfillments_report.rb' - -# Offense count: 13 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines -Style/EmptyLinesAroundModuleBody: - Exclude: - - 'app/helpers/add_to_cart_helper.rb' - - 'app/helpers/groups_helper.rb' - - 'app/helpers/injection_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' - - 'lib/open_food_network/order_grouper.rb' - - 'lib/open_food_network/variant_and_line_item_naming.rb' - - 'spec/models/spree/ability_spec.rb' - - 'spec/support/request/distribution_helper.rb' - - 'spec/support/request/ui_component_helper.rb' - # Offense count: 2 # Cop supports --auto-correct. Style/EmptyLiteral: @@ -956,49 +1573,6 @@ Style/EmptyMethod: - 'app/controllers/shops_controller.rb' - 'app/controllers/spree/admin/products_controller_decorator.rb' -# Offense count: 54 -# Cop supports --auto-correct. -# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. -Style/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' - - 'app/models/spree/product_set.rb' - - 'app/serializers/api/enterprise_serializer.rb' - - 'config.ru' - - 'lib/open_food_network/bulk_coop_report.rb' - - 'lib/open_food_network/option_value_namer.rb' - - 'lib/open_food_network/paperclippable.rb' - - 'lib/open_food_network/variant_and_line_item_naming.rb' - - 'lib/spree/product_filters.rb' - - 'lib/tasks/karma.rake' - - 'spec/controllers/admin/accounts_and_billing_settings_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/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' - - 'spec/lib/open_food_network/reports/rule_spec.rb' - - 'spec/lib/open_food_network/xero_invoices_report_spec.rb' - - 'spec/models/enterprise_fee_spec.rb' - - 'spec/models/enterprise_spec.rb' - - 'spec/models/order_cycle_spec.rb' - - 'spec/models/spree/adjustment_spec.rb' - - 'spec/models/spree/order_spec.rb' - - '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/support/request/web_helper.rb' - # Offense count: 2 # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms. # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS @@ -1008,12 +1582,10 @@ Style/FileName: - 'Guardfile' # Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses -Style/FirstParameterIndentation: - Exclude: - - 'lib/open_food_network/permissions.rb' +# Configuration parameters: SupportedStyles. +# SupportedStyles: annotated, template +Style/FormatStringToken: + EnforcedStyle: template # Offense count: 88 # Configuration parameters: MinBodyLength. @@ -1085,104 +1657,12 @@ Style/IfInsideElse: - 'app/controllers/spree/admin/overview_controller_decorator.rb' - 'app/controllers/spree/admin/products_controller_decorator.rb' -# Offense count: 6 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: special_inside_parentheses, consistent, align_brackets -Style/IndentArray: - Exclude: - - 'lib/open_food_network/users_and_enterprises_report.rb' - - 'spec/features/admin/reports_spec.rb' - - 'spec/lib/open_food_network/products_and_inventory_report_spec.rb' - -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: IndentationWidth. -Style/IndentAssignment: - Exclude: - - 'app/controllers/spree/admin/reports_controller_decorator.rb' - -# Offense count: 52 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: special_inside_parentheses, consistent, align_braces -Style/IndentHash: - Exclude: - - 'app/controllers/admin/accounts_and_billing_settings_controller.rb' - - 'app/controllers/admin/business_model_configuration_controller.rb' - - 'app/controllers/checkout_controller.rb' - - 'app/controllers/spree/admin/search_controller_decorator.rb' - - 'app/jobs/finalize_account_invoices.rb' - - 'app/jobs/update_account_invoices.rb' - - 'app/jobs/update_billable_periods.rb' - - 'app/models/spree/order_decorator.rb' - - 'spec/controllers/admin/accounts_and_billing_settings_controller_spec.rb' - - 'spec/controllers/admin/business_model_configuration_controller_spec.rb' - - 'spec/controllers/admin/order_cycles_controller_spec.rb' - - 'spec/features/admin/accounts_and_billing_settings_spec.rb' - - 'spec/features/admin/business_model_configuration_spec.rb' - - 'spec/features/admin/tax_settings_spec.rb' - - 'spec/lib/open_food_network/order_cycle_form_applicator_spec.rb' - - 'spec/support/request/authentication_workflow.rb' - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent -Style/IndentHeredoc: - Exclude: - - 'app/models/content_configuration.rb' - -# Offense count: 21 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: normal, rails -Style/IndentationConsistency: - Exclude: - - 'app/controllers/spree/admin/reports_controller_decorator.rb' - - 'lib/open_food_network/permissions.rb' - - 'spec/controllers/admin/order_cycles_controller_spec.rb' - - 'spec/controllers/admin/tag_rules_controller_spec.rb' - - 'spec/features/consumer/shopping/checkout_spec.rb' - - 'spec/helpers/admin/business_model_configuration_helper_spec.rb' - - 'spec/models/spree/line_item_spec.rb' - - 'spec/models/spree/product_spec.rb' - -# Offense count: 20 -# Cop supports --auto-correct. -# Configuration parameters: Width, IgnoredPatterns. -Style/IndentationWidth: - Exclude: - - 'app/controllers/admin/invoice_settings_controller.rb' - - 'app/controllers/admin/order_cycles_controller.rb' - - 'app/controllers/api/order_cycles_controller.rb' - - 'app/controllers/spree/admin/reports_controller_decorator.rb' - - 'app/models/spree/line_item_decorator.rb' - - 'app/serializers/api/admin/for_order_cycle/enterprise_serializer.rb' - - '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' - - 'lib/open_food_network/last_used_address.rb' - - 'spec/features/consumer/shopping/variant_overrides_spec.rb' - - 'spec/helpers/admin/business_model_configuration_helper_spec.rb' - - 'spec/helpers/groups_helper_spec.rb' - - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' - - 'spec/lib/open_food_network/order_grouper_spec.rb' - - 'spec/lib/spree/product_filters_spec.rb' - - 'spec/models/enterprise_spec.rb' - # Offense count: 1 # Cop supports --auto-correct. Style/InfiniteLoop: Exclude: - 'lib/open_food_network/rack_request_blocker.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Style/InitialIndentation: - Exclude: - - 'spec/models/spree/calculator/flat_percent_item_total_spec.rb' - # Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: InverseMethods, InverseBlocks. @@ -1191,41 +1671,6 @@ Style/InverseMethods: - 'app/controllers/admin/column_preferences_controller.rb' - 'spec/support/cancan_helper.rb' -# Offense count: 80 -# Cop supports --auto-correct. -Style/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' - - 'app/models/spreadsheet_entry.rb' - - 'app/models/spree/inventory_unit_decorator.rb' - - 'app/models/spree/taxon_decorator.rb' - - 'app/overrides/add_capture_order_shortcut.rb' - - 'app/serializers/api/address_serializer.rb' - - 'app/serializers/api/enterprise_serializer.rb' - - 'app/serializers/api/product_serializer.rb' - - 'lib/tasks/users.rake' - - 'spec/archive/features/consumer/checkout_spec.rb' - - 'spec/controllers/spree/api/line_items_controller_spec.rb' - - 'spec/factories.rb' - - 'spec/features/admin/products_spec.rb' - - 'spec/features/admin/reports_spec.rb' - - 'spec/features/consumer/shops_spec.rb' - - 'spec/jobs/finalize_account_invoices_spec.rb' - - 'spec/lib/open_food_network/order_and_distributor_report_spec.rb' - - 'spec/lib/open_food_network/order_grouper_spec.rb' - - 'spec/lib/open_food_network/user_balance_calculator_spec.rb' - - 'spec/models/enterprise_spec.rb' - - 'spec/models/spree/order_spec.rb' - - 'spec/spec_helper.rb' - - 'spec/support/cancan_helper.rb' - - 'spec/support/matchers/select2_matchers.rb' - - 'spec/support/request/authentication_workflow.rb' - # Offense count: 9 # Cop supports --auto-correct. Style/LineEndConcatenation: @@ -1270,53 +1715,6 @@ Style/MethodMissing: Exclude: - 'app/helpers/application_helper.rb' -# Offense count: 10 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: symmetrical, new_line, same_line -Style/MultilineArrayBraceLayout: - Exclude: - - 'lib/open_food_network/customers_report.rb' - - 'lib/open_food_network/order_cycle_management_report.rb' - - 'lib/open_food_network/orders_and_fulfillments_report.rb' - - 'lib/open_food_network/packing_report.rb' - - 'lib/open_food_network/xero_invoices_report.rb' - - 'spec/archive/features/consumer/checkout_spec.rb' - -# Offense count: 44 -# Cop supports --auto-correct. -Style/MultilineBlockLayout: - Exclude: - - 'app/models/spree/calculator/default_tax_decorator.rb' - - 'app/models/spree/product_decorator.rb' - - 'lib/open_food_network/users_and_enterprises_report.rb' - - 'spec/controllers/admin/column_preferences_controller_spec.rb' - - 'spec/controllers/shop_controller_spec.rb' - - 'spec/controllers/spree/orders_controller_spec.rb' - - 'spec/features/admin/variant_overrides_spec.rb' - - 'spec/helpers/enterprises_helper_spec.rb' - - 'spec/jobs/update_billable_periods_spec.rb' - - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' - - 'spec/lib/open_food_network/permissions_spec.rb' - - 'spec/lib/open_food_network/user_balance_calculator_spec.rb' - - 'spec/models/column_preference_spec.rb' - - 'spec/models/order_cycle_spec.rb' - - 'spec/models/spree/product_spec.rb' - - 'spec/models/spree/variant_spec.rb' - - 'spec/serializers/enterprise_serializer_spec.rb' - -# Offense count: 6 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: symmetrical, new_line, same_line -Style/MultilineHashBraceLayout: - Exclude: - - 'app/controllers/spree/admin/products_controller_decorator.rb' - - 'app/models/billable_period.rb' - - 'lib/spree/product_filters.rb' - - 'spec/controllers/admin/order_cycles_controller_spec.rb' - - 'spec/support/request/authentication_workflow.rb' - # Offense count: 5 # Cop supports --auto-correct. Style/MultilineIfModifier: @@ -1324,89 +1722,6 @@ Style/MultilineIfModifier: - 'lib/open_food_network/enterprise_issue_validator.rb' - 'lib/spree/core/controller_helpers/respond_with_decorator.rb' -# Offense count: 6 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: symmetrical, new_line, same_line -Style/MultilineMethodCallBraceLayout: - Exclude: - - 'app/helpers/spree/orders_helper.rb' - - 'app/models/spree/variant_decorator.rb' - - 'app/overrides/add_capture_order_shortcut.rb' - - 'lib/open_food_network/products_renderer.rb' - - 'spec/lib/open_food_network/products_and_inventory_report_spec.rb' - -# Offense count: 191 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: aligned, indented, indented_relative_to_receiver -Style/MultilineMethodCallIndentation: - Exclude: - - 'app/controllers/admin/order_cycles_controller.rb' - - 'app/controllers/admin/variant_overrides_controller.rb' - - 'app/controllers/api/order_cycles_controller.rb' - - 'app/controllers/base_controller.rb' - - 'app/controllers/checkout_controller.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/api/products_controller_decorator.rb' - - 'app/controllers/spree/orders_controller_decorator.rb' - - 'app/jobs/update_billable_periods.rb' - - 'app/models/column_preference.rb' - - 'app/models/enterprise.rb' - - 'app/models/enterprise_relationship.rb' - - 'app/models/exchange.rb' - - 'app/models/order_cycle.rb' - - 'app/models/product_importer.rb' - - 'app/models/spree/ability_decorator.rb' - - 'app/models/spree/calculator/default_tax_decorator.rb' - - 'app/models/spree/line_item_decorator.rb' - - 'app/models/spree/order_decorator.rb' - - 'app/models/spree/payment_method_decorator.rb' - - 'app/models/spree/product_decorator.rb' - - 'app/models/spree/shipping_method_decorator.rb' - - 'app/models/spree/taxon_decorator.rb' - - 'app/models/spree/user_decorator.rb' - - 'app/models/spree/variant_decorator.rb' - - 'app/serializers/api/admin/exchange_serializer.rb' - - 'lib/open_food_network/lettuce_share_report.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' - - 'spec/controllers/spree/admin/reports_controller_spec.rb' - - 'spec/helpers/order_cycles_helper_spec.rb' - - 'spec/jobs/update_account_invoices_spec.rb' - - 'spec/jobs/update_billable_periods_spec.rb' - - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' - - 'spec/mailers/producer_mailer_spec.rb' - - 'spec/support/matchers/table_matchers.rb' - -# Offense count: 34 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: aligned, indented -Style/MultilineOperationIndentation: - Exclude: - - 'app/controllers/application_controller.rb' - - 'app/controllers/spree/admin/payment_methods_controller_decorator.rb' - - 'app/controllers/spree/admin/shipping_methods_controller_decorator.rb' - - 'app/helpers/enterprises_helper.rb' - - 'app/models/producer_property.rb' - - 'app/models/product_importer.rb' - - 'app/models/spree/ability_decorator.rb' - - 'app/models/spree/order_decorator.rb' - - 'app/models/spree/product_set.rb' - - 'app/models/variant_override_set.rb' - - 'lib/open_food_network/accounts_and_billing_settings_validator.rb' - - 'lib/open_food_network/order_cycle_permissions.rb' - - 'lib/open_food_network/products_cache_refreshment.rb' - - 'lib/open_food_network/sales_tax_report.rb' - - 'lib/open_food_network/users_and_enterprises_report.rb' - - 'spec/factories.rb' - # Offense count: 8 # Cop supports --auto-correct. Style/MutableConstant: @@ -1669,272 +1984,6 @@ Style/RescueModifier: - 'app/controllers/spree/admin/reports_controller_decorator.rb' - 'lib/tasks/data.rake' -# Offense count: 7 -# Cop supports --auto-correct. -Style/SpaceAfterColon: - Exclude: - - 'spec/features/admin/variants_spec.rb' - - 'spec/features/consumer/account_spec.rb' - - 'spec/models/spree/ability_spec.rb' - - 'spec/models/variant_override_spec.rb' - - 'spec/spec_helper.rb' - -# Offense count: 58 -# Cop supports --auto-correct. -Style/SpaceAfterComma: - Exclude: - - 'app/controllers/admin/order_cycles_controller.rb' - - 'app/controllers/spree/admin/products_controller_decorator.rb' - - 'app/controllers/spree/admin/reports_controller_decorator.rb' - - 'app/controllers/spree/orders_controller_decorator.rb' - - 'app/models/column_preference.rb' - - 'app/models/product_importer.rb' - - 'lib/discourse/single_sign_on.rb' - - 'lib/open_food_network/accounts_and_billing_settings_validator.rb' - - 'lib/open_food_network/business_model_configuration_validator.rb' - - 'lib/open_food_network/order_and_distributor_report.rb' - - 'lib/open_food_network/order_cycle_form_applicator.rb' - - 'lib/open_food_network/users_and_enterprises_report.rb' - - 'spec/controllers/admin/enterprises_controller_spec.rb' - - 'spec/controllers/admin/variant_overrides_controller_spec.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/variant_overrides_spec.rb' - - 'spec/jobs/update_account_invoices_spec.rb' - - 'spec/lib/open_food_network/group_buy_report_spec.rb' - - 'spec/lib/open_food_network/order_and_distributor_report_spec.rb' - - 'spec/models/content_configuration_spec.rb' - - 'spec/models/spree/order_spec.rb' - - 'spec/models/tag_rule/discount_order_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/spec_helper.rb' - - 'spec/support/cancan_helper.rb' - -# Offense count: 3 -# Cop supports --auto-correct. -Style/SpaceAfterSemicolon: - Exclude: - - 'spec/controllers/spree/admin/base_controller_spec.rb' - - 'spec/models/enterprise_spec.rb' - -# Offense count: 67 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: space, no_space -Style/SpaceAroundEqualsInParameterDefault: - Exclude: - - 'app/controllers/spree/admin/base_controller_decorator.rb' - - 'app/helpers/admin/injection_helper.rb' - - 'app/helpers/angular_form_helper.rb' - - 'app/helpers/checkout_helper.rb' - - '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' - - 'app/models/exchange.rb' - - 'app/models/model_set.rb' - - 'app/models/order_cycle_set.rb' - - 'app/models/product_importer.rb' - - 'app/models/spree/calculator/per_item_decorator.rb' - - 'app/models/spree/payment_decorator.rb' - - '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' - - 'lib/open_food_network/accounts_and_billing_settings_validator.rb' - - 'lib/open_food_network/bill_calculator.rb' - - 'lib/open_food_network/business_model_configuration_validator.rb' - - 'lib/open_food_network/enterprise_fee_calculator.rb' - - 'lib/open_food_network/enterprise_issue_validator.rb' - - 'lib/open_food_network/order_cycle_form_applicator.rb' - - 'lib/open_food_network/permissions.rb' - - 'lib/open_food_network/scope_variant_to_hub.rb' - - 'lib/open_food_network/tag_rule_applicator.rb' - - 'lib/open_food_network/xero_invoices_report.rb' - - 'lib/spree/money_decorator.rb' - - 'spec/features/admin/enterprise_relationships_spec.rb' - - 'spec/features/admin/reports_spec.rb' - - 'spec/models/enterprise_spec.rb' - - 'spec/support/matchers/select2_matchers.rb' - - 'spec/support/request/distribution_helper.rb' - - 'spec/support/request/web_helper.rb' - -# Offense count: 58 -# Cop supports --auto-correct. -# Configuration parameters: AllowForAlignment. -Style/SpaceAroundOperators: - Exclude: - - 'app/controllers/admin/product_import_controller.rb' - - 'app/controllers/checkout_controller.rb' - - 'app/helpers/admin/business_model_configuration_helper.rb' - - 'app/jobs/update_billable_periods.rb' - - 'app/models/product_importer.rb' - - 'app/models/spree/address_decorator.rb' - - 'app/overrides/remove_search_bar.rb' - - 'app/overrides/remove_side_bar.rb' - - 'app/overrides/replace_shipping_address_form_with_distributor_details.rb' - - 'app/serializers/api/enterprise_serializer.rb' - - 'lib/open_food_network/xero_invoices_report.rb' - - 'lib/spree/product_filters.rb' - - 'spec/controllers/admin/enterprises_controller_spec.rb' - - 'spec/controllers/cart_controller_spec.rb' - - 'spec/controllers/spree/orders_controller_spec.rb' - - 'spec/controllers/user_passwords_controller_spec.rb' - - 'spec/factories.rb' - - 'spec/features/admin/bulk_order_management_spec.rb' - - 'spec/features/admin/bulk_product_update_spec.rb' - - 'spec/features/consumer/shopping/checkout_spec.rb' - - 'spec/helpers/checkout_helper_spec.rb' - - 'spec/helpers/order_cycles_helper_spec.rb' - - 'spec/jobs/update_billable_periods_spec.rb' - - 'spec/lib/open_food_network/order_grouper_spec.rb' - - 'spec/models/calculator/weight_spec.rb' - - 'spec/support/cancan_helper.rb' - - 'spec/support/seeds.rb' - -# Offense count: 6 -# Cop supports --auto-correct. -Style/SpaceBeforeComma: - Exclude: - - 'app/helpers/checkout_helper.rb' - - 'app/models/spree/ability_decorator.rb' - - 'lib/open_food_network/orders_and_fulfillments_report.rb' - - 'spec/features/admin/bulk_order_management_spec.rb' - - 'spec/features/admin/bulk_product_update_spec.rb' - -# Offense count: 4 -# Cop supports --auto-correct. -# Configuration parameters: AllowForAlignment. -Style/SpaceBeforeFirstArg: - Exclude: - - 'spec/factories.rb' - - 'spec/features/admin/bulk_product_update_spec.rb' - - 'spec/models/enterprise_fee_spec.rb' - -# Offense count: 1 -# Cop supports --auto-correct. -Style/SpaceBeforeSemicolon: - Exclude: - - 'spec/models/enterprise_spec.rb' - -# Offense count: 5 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: require_no_space, require_space -Style/SpaceInLambdaLiteral: - Exclude: - - 'app/models/spree/product_decorator.rb' - - 'app/models/spree/variant_decorator.rb' - -# Offense count: 194 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters. -# SupportedStyles: space, no_space -# SupportedStylesForEmptyBraces: space, no_space -Style/SpaceInsideBlockBraces: - Exclude: - - 'app/controllers/spree/admin/payment_methods_controller_decorator.rb' - - 'app/controllers/spree/admin/payments_controller_decorator.rb' - - 'app/controllers/spree/admin/variants_controller_decorator.rb' - - 'app/controllers/spree/orders_controller_decorator.rb' - - 'app/models/column_preference.rb' - - 'app/models/spree/order_decorator.rb' - - 'lib/spree/product_filters.rb' - - 'lib/tasks/dev.rake' - - 'lib/tasks/karma.rake' - - 'spec/archive/features/consumer/checkout_spec.rb' - - 'spec/controllers/admin/accounts_and_billing_settings_controller_spec.rb' - - 'spec/controllers/admin/business_model_configuration_controller_spec.rb' - - 'spec/controllers/admin/inventory_items_controller_spec.rb' - - 'spec/controllers/admin/tag_rules_controller_spec.rb' - - 'spec/controllers/admin/variant_overrides_controller_spec.rb' - - 'spec/controllers/spree/admin/base_controller_spec.rb' - - 'spec/controllers/spree/admin/orders_controller_spec.rb' - - 'spec/controllers/spree/admin/search_controller_spec.rb' - - 'spec/factories.rb' - - 'spec/features/admin/bulk_order_management_spec.rb' - - 'spec/features/admin/customers_spec.rb' - - 'spec/features/admin/tag_rules_spec.rb' - - 'spec/features/consumer/account_spec.rb' - - 'spec/features/consumer/shopping/products_spec.rb' - - 'spec/features/consumer/shops_spec.rb' - - 'spec/helpers/enterprises_helper_spec.rb' - - 'spec/helpers/injection_helper_spec.rb' - - 'spec/helpers/spree/orders_helper_spec.rb' - - 'spec/jobs/finalize_account_invoices_spec.rb' - - 'spec/jobs/update_account_invoices_spec.rb' - - 'spec/jobs/update_billable_periods_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/orders_and_fulfillments_report_spec.rb' - - 'spec/lib/open_food_network/products_renderer_spec.rb' - - 'spec/lib/open_food_network/tag_rule_applicator_spec.rb' - - 'spec/models/column_preference_spec.rb' - - 'spec/models/enterprise_relationship_spec.rb' - - 'spec/models/enterprise_spec.rb' - - 'spec/models/spree/line_item_spec.rb' - - 'spec/models/spree/order_spec.rb' - - 'spec/models/spree/payment_spec.rb' - - 'spec/models/spree/product_spec.rb' - - 'spec/models/spree/user_spec.rb' - - 'spec/models/tag_rule/discount_order_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/orders_by_distributor_serializer_spec.rb' - - 'spec/spec_helper.rb' - - 'spec/support/cancan_helper.rb' - -# Offense count: 140 -# Cop supports --auto-correct. -Style/SpaceInsideBrackets: - Exclude: - - 'app/controllers/admin/order_cycles_controller.rb' - - 'app/helpers/spree/reports_helper.rb' - - 'app/models/enterprise.rb' - - 'app/serializers/api/admin/exchange_serializer.rb' - - 'lib/open_food_network/bulk_coop_report.rb' - - 'lib/open_food_network/order_and_distributor_report.rb' - - 'lib/open_food_network/orders_and_fulfillments_report.rb' - - 'lib/open_food_network/packing_report.rb' - - 'lib/open_food_network/payments_report.rb' - - 'lib/open_food_network/users_and_enterprises_report.rb' - - 'spec/controllers/admin/variant_overrides_controller_spec.rb' - - 'spec/controllers/cart_controller_spec.rb' - - 'spec/features/admin/reports_spec.rb' - - 'spec/jobs/update_billable_periods_spec.rb' - - 'spec/lib/open_food_network/order_and_distributor_report_spec.rb' - - 'spec/lib/open_food_network/order_grouper_spec.rb' - - 'spec/lib/open_food_network/users_and_enterprises_report_spec.rb' - - 'spec/performance/orders_controller_spec.rb' - -# Offense count: 729 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces. -# SupportedStyles: space, no_space, compact -# SupportedStylesForEmptyBraces: space, no_space -Style/SpaceInsideHashLiteralBraces: - Enabled: false - -# Offense count: 10 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: space, no_space -Style/SpaceInsideStringInterpolation: - Exclude: - - 'app/controllers/enterprises_controller.rb' - - 'lib/open_food_network/users_and_enterprises_report.rb' - - 'spec/support/request/web_helper.rb' - # Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. @@ -1964,7 +2013,7 @@ Style/StructInheritance: # Offense count: 182 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle, MinSize, SupportedStyles. # SupportedStyles: percent, brackets Style/SymbolArray: Exclude: @@ -2040,15 +2089,6 @@ Style/SymbolProc: - 'spec/lib/open_food_network/order_grouper_spec.rb' - 'spec/models/spree/user_spec.rb' -# Offense count: 6 -# Cop supports --auto-correct. -Style/Tab: - Exclude: - - 'app/controllers/admin/invoice_settings_controller.rb' - - 'app/models/spree/line_item_decorator.rb' - - 'spec/lib/spree/product_filters_spec.rb' - - 'spec/models/spree/line_item_spec.rb' - # Offense count: 6 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, AllowSafeAssignment. @@ -2067,30 +2107,6 @@ Style/TrailingUnderscoreVariable: Exclude: - 'lib/open_food_network/option_value_namer.rb' -# Offense count: 32 -# Cop supports --auto-correct. -Style/TrailingWhitespace: - Exclude: - - 'app/models/distributor_shipping_method.rb' - - 'app/models/product_importer.rb' - - 'app/models/spree/money_decorator.rb' - - 'app/serializers/api/image_serializer.rb' - - 'app/serializers/api/shipping_method_serializer.rb' - - 'app/views/json/_current_order.rabl' - - 'app/views/json/_enterprises.rabl' - - 'app/views/json/_producer.rabl' - - 'app/views/json/partials/_producer.rabl' - - 'lib/open_food_network/group_buy_report.rb' - - '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/support/request/menu_helper.rb' - - 'spec/views/json/producers.json.rabl_spec.rb' - # Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.