Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
553 lines (507 sloc) 21.2 KB
# This configuration was generated by
# `rubocop --auto-gen-config --exclude-limit 1400`
# on 2019-05-28 16:29:07 +0100 using RuboCop version 0.57.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
# SupportedStylesAlignWith: start_of_line, def
Layout/DefEndAlignment:
Exclude:
- 'app/models/order_updater.rb'
# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
# SupportedStylesAlignWith: keyword, variable, start_of_line
Layout/EndAlignment:
Exclude:
- 'app/controllers/admin/order_cycles_controller.rb'
- 'app/controllers/api/order_cycles_controller.rb'
- 'app/serializers/api/admin/for_order_cycle/supplied_product_serializer.rb'
- 'app/serializers/api/admin/order_cycle_serializer.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_braces
Layout/IndentHash:
EnforcedStyle: consistent
# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: aligned, indented, indented_relative_to_receiver
Layout/MultilineMethodCallIndentation:
Exclude:
- 'app/models/spree/line_item_decorator.rb'
- 'app/models/spree/product_decorator.rb'
# Offense count: 4
Lint/AmbiguousOperator:
Exclude:
- 'app/controllers/spree/admin/orders/customer_details_controller_decorator.rb'
- 'app/controllers/spree/admin/orders_controller_decorator.rb'
- 'spec/controllers/api/enterprise_fees_controller_spec.rb'
- 'spec/controllers/spree/admin/payments_controller_spec.rb'
# Offense count: 4
Lint/DuplicateMethods:
Exclude:
- 'lib/discourse/single_sign_on.rb'
- 'lib/open_food_network/subscription_summary.rb'
# Offense count: 15
Lint/IneffectiveAccessModifier:
Exclude:
- 'app/models/column_preference.rb'
- 'app/services/mail_configuration.rb'
- 'lib/open_food_network/feature_toggle.rb'
- 'lib/open_food_network/products_cache.rb'
- 'spec/lib/open_food_network/reports/report_spec.rb'
# Offense count: 1
Lint/InterpolationCheck:
Exclude:
- 'spec/features/consumer/shopping/embedded_groups_spec.rb'
# Offense count: 3
Lint/ShadowingOuterLocalVariable:
Exclude:
- 'app/models/model_set.rb'
- 'spec/models/model_set_spec.rb'
# Offense count: 2
Lint/UnderscorePrefixedVariableName:
Exclude:
- 'spec/support/cancan_helper.rb'
# Offense count: 6
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
Lint/UselessAccessModifier:
Exclude:
- 'app/models/column_preference.rb'
- 'app/services/mail_configuration.rb'
- 'lib/open_food_network/feature_toggle.rb'
- 'lib/open_food_network/products_cache.rb'
- 'lib/open_food_network/reports/bulk_coop_report.rb'
- 'spec/lib/open_food_network/reports/report_spec.rb'
# Offense count: 91
# Configuration parameters: CheckForMethodsWithNoSideEffects.
Lint/Void:
Exclude:
- 'app/serializers/api/enterprise_serializer.rb'
- 'spec/features/admin/bulk_product_update_spec.rb'
- 'spec/features/admin/enterprise_groups_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/payment_method_spec.rb'
- 'spec/features/admin/products_spec.rb'
- 'spec/features/admin/variant_overrides_spec.rb'
- 'spec/features/admin/variants_spec.rb'
- 'spec/features/consumer/shopping/checkout_spec.rb'
- 'spec/features/consumer/shopping/shopping_spec.rb'
- 'spec/features/consumer/shopping/variant_overrides_spec.rb'
# Offense count: 109
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength:
Max: 774
# Offense count: 7
Naming/AccessorMethodName:
Exclude:
- 'app/models/spree/adjustment_decorator.rb'
- 'app/models/spree/order_decorator.rb'
- 'spec/support/request/shop_workflow.rb'
- 'spec/support/request/web_helper.rb'
# Offense count: 1
Naming/BinaryOperatorParameterName:
Exclude:
- 'app/models/exchange.rb'
# Offense count: 1
# Configuration parameters: Blacklist.
# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
Naming/HeredocDelimiterNaming:
Exclude:
- 'app/models/content_configuration.rb'
# Offense count: 4
Naming/MemoizedInstanceVariableName:
Exclude:
- 'app/controllers/spree/admin/payments_controller_decorator.rb'
- 'lib/open_food_network/address_finder.rb'
# Offense count: 22
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
# NamePrefix: is_, has_, have_
# NamePrefixBlacklist: is_, has_, have_
# NameWhitelist: is_a?
# MethodDefinitionMacros: define_method, define_singleton_method
Naming/PredicateName:
Exclude:
- 'spec/**/*'
- 'app/mailers/producer_mailer.rb'
- 'app/models/enterprise.rb'
- 'app/models/enterprise_relationship.rb'
- 'app/models/order_cycle.rb'
- 'app/models/spree/ability_decorator.rb'
- 'app/models/spree/adjustment_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/preferences/file_configuration.rb'
- 'app/models/spree/product_decorator.rb'
- 'app/models/spree/shipping_method_decorator.rb'
- 'lib/open_food_network/customers_report.rb'
- 'lib/open_food_network/order_cycle_management_report.rb'
- 'lib/open_food_network/order_grouper.rb'
- 'lib/open_food_network/packing_report.rb'
- 'lib/tasks/data.rake'
# Offense count: 12
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: io, id, to, by, on, in, at
Naming/UncommunicativeMethodParamName:
Exclude:
- 'app/helpers/admin/injection_helper.rb'
- 'app/helpers/spree/admin/base_helper_decorator.rb'
- 'app/helpers/spree/base_helper_decorator.rb'
- 'app/models/exchange.rb'
- 'app/services/subscription_validator.rb'
- 'lib/open_food_network/reports/bulk_coop_report.rb'
- 'lib/open_food_network/xero_invoices_report.rb'
- 'spec/lib/open_food_network/reports/report_spec.rb'
- 'spec/mailers/producer_mailer_spec.rb'
# Offense count: 3
# Configuration parameters: EnforcedStyle.
# SupportedStyles: snake_case, camelCase
Naming/VariableName:
Exclude:
- 'app/helpers/admin/injection_helper.rb'
# Offense count: 4
# Configuration parameters: EnforcedStyle.
# SupportedStyles: snake_case, normalcase, non_integer
Naming/VariableNumber:
Exclude:
- 'spec/lib/open_food_network/products_and_inventory_report_spec.rb'
# Offense count: 1
Performance/Caller:
Exclude:
- 'app/controllers/application_controller.rb'
# Offense count: 1
# Configuration parameters: EnforcedStyle.
# SupportedStyles: strict, flexible
Rails/Date:
Exclude:
- 'app/models/order_cycle.rb'
# Offense count: 8
# Configuration parameters: EnforcedStyle.
# SupportedStyles: slashes, arguments
Rails/FilePath:
Exclude:
- 'lib/tasks/karma.rake'
- 'spec/features/admin/bulk_product_update_spec.rb'
- 'spec/features/admin/content_spec.rb'
- 'spec/models/content_configuration_spec.rb'
- 'spec/models/spree/image_spec.rb'
- 'spec/models/spree/variant_spec.rb'
- 'spec/spec_helper.rb'
# Offense count: 7
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/HasAndBelongsToMany:
Exclude:
- 'app/models/enterprise.rb'
- 'app/models/enterprise_group.rb'
- 'app/models/order_cycle.rb'
- 'app/models/schedule.rb'
- 'app/models/spree/concerns/payment_method_distributors.rb'
- 'app/models/spree/line_item_decorator.rb'
# Offense count: 25
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/HasManyOrHasOneDependent:
Exclude:
- 'app/models/customer.rb'
- 'app/models/enterprise.rb'
- 'app/models/order_cycle.rb'
- 'app/models/spree/adjustment_decorator.rb'
- 'app/models/spree/order_decorator.rb'
- 'app/models/spree/payment_method_decorator.rb'
- 'app/models/spree/property_decorator.rb'
- 'app/models/spree/shipping_method_decorator.rb'
- 'app/models/spree/user_decorator.rb'
- 'app/models/spree/variant_decorator.rb'
- 'app/models/subscription.rb'
# Offense count: 6
Rails/OutputSafety:
Exclude:
- 'app/controllers/spree/admin/reports_controller_decorator.rb'
- 'app/helpers/angular_form_helper.rb'
- '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: 15
# Configuration parameters: EnforcedStyle.
# SupportedStyles: strict, flexible
Rails/TimeZone:
Exclude:
- 'app/controllers/api/statuses_controller.rb'
- 'app/jobs/heartbeat_job.rb'
- 'lib/open_food_network/rack_request_blocker.rb'
- 'lib/open_food_network/users_and_enterprises_report.rb'
- 'spec/controllers/api/statuses_controller_spec.rb'
- 'spec/jobs/heartbeat_job_spec.rb'
- 'spec/lib/open_food_network/products_cache_refreshment_spec.rb'
- 'spec/lib/open_food_network/products_cache_spec.rb'
- 'spec/models/enterprise_relationship_spec.rb'
# Offense count: 1
# Configuration parameters: Environments.
# Environments: development, test, production
Rails/UnknownEnv:
Exclude:
- 'app/models/spree/app_configuration_decorator.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: braces, no_braces, context_dependent
Style/BracesAroundHashParameters:
Exclude:
- 'spec/spec_helper.rb'
# Offense count: 2
Style/CaseEquality:
Exclude:
- 'app/helpers/angular_form_helper.rb'
- 'spec/models/spree/payment_spec.rb'
# Offense count: 79
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Exclude:
- 'app/controllers/spree/store_controller_decorator.rb'
- 'app/helpers/angular_form_helper.rb'
- 'app/models/calculator/flat_percent_per_item.rb'
- 'app/models/spree/concerns/payment_method_distributors.rb'
- 'app/models/spree/gateway/migs.rb'
- 'app/models/spree/gateway/pin.rb'
- 'app/models/spree/preferences/file_configuration.rb'
- 'app/models/spree/product_set.rb'
- 'app/models/tag_rule/discount_order.rb'
- 'app/models/tag_rule/filter_order_cycles.rb'
- 'app/models/tag_rule/filter_payment_methods.rb'
- 'app/models/tag_rule/filter_shipping_methods.rb'
- 'app/serializers/api/address_serializer.rb'
- 'app/serializers/api/admin/basic_enterprise_fee_serializer.rb'
- 'app/serializers/api/admin/basic_enterprise_serializer.rb'
- 'app/serializers/api/admin/basic_order_cycle_serializer.rb'
- 'app/serializers/api/admin/calculator/flat_percent_item_total_serializer.rb'
- 'app/serializers/api/admin/calculator_serializer.rb'
- 'app/serializers/api/admin/column_preference_serializer.rb'
- 'app/serializers/api/admin/customer_serializer.rb'
- 'app/serializers/api/admin/enterprise_fee_serializer.rb'
- 'app/serializers/api/admin/enterprise_relationship_permission_serializer.rb'
- 'app/serializers/api/admin/enterprise_relationship_serializer.rb'
- 'app/serializers/api/admin/enterprise_role_serializer.rb'
- 'app/serializers/api/admin/enterprise_serializer.rb'
- 'app/serializers/api/admin/exchange_serializer.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/id_name_serializer.rb'
- 'app/serializers/api/admin/id_serializer.rb'
- 'app/serializers/api/admin/index_enterprise_serializer.rb'
- 'app/serializers/api/admin/inventory_item_serializer.rb'
- 'app/serializers/api/admin/line_item_serializer.rb'
- '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/stripe_serializer.rb'
- 'app/serializers/api/admin/product_serializer.rb'
- 'app/serializers/api/admin/shipping_method_serializer.rb'
- 'app/serializers/api/admin/tag_rule_serializer.rb'
- 'app/serializers/api/admin/tax_category_serializer.rb'
- 'app/serializers/api/admin/taxon_serializer.rb'
- 'app/serializers/api/admin/units_product_serializer.rb'
- 'app/serializers/api/admin/units_variant_serializer.rb'
- 'app/serializers/api/admin/user_serializer.rb'
- 'app/serializers/api/admin/variant_override_serializer.rb'
- 'app/serializers/api/admin/variant_serializer.rb'
- 'app/serializers/api/country_serializer.rb'
- 'app/serializers/api/currency_config_serializer.rb'
- 'app/serializers/api/current_order_serializer.rb'
- 'app/serializers/api/enterprise_serializer.rb'
- 'app/serializers/api/id_name_serializer.rb'
- 'app/serializers/api/id_serializer.rb'
- 'app/serializers/api/image_serializer.rb'
- 'app/serializers/api/line_item_serializer.rb'
- 'app/serializers/api/payment_method_serializer.rb'
- 'app/serializers/api/product_serializer.rb'
- 'app/serializers/api/property_serializer.rb'
- 'app/serializers/api/shipping_method_serializer.rb'
- 'app/serializers/api/state_serializer.rb'
- 'app/serializers/api/taxon_image_serializer.rb'
- 'app/serializers/api/taxon_serializer.rb'
- 'app/serializers/api/variant_serializer.rb'
- 'lib/open_food_network/locking.rb'
- 'lib/open_food_network/reports/bulk_coop_allocation_report.rb'
- 'lib/open_food_network/reports/bulk_coop_report.rb'
- 'lib/open_food_network/reports/bulk_coop_supplier_report.rb'
- 'lib/open_food_network/reports/report.rb'
- 'lib/open_food_network/reports/row.rb'
- 'lib/open_food_network/reports/rule.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'
- 'spec/lib/open_food_network/reports/rule_spec.rb'
# Offense count: 2
Style/ClassVars:
Exclude:
- 'lib/open_food_network/rack_request_blocker.rb'
# Offense count: 1
Style/CommentedKeyword:
Exclude:
- 'app/controllers/application_controller.rb'
# Offense count: 2
Style/DateTime:
Exclude:
- 'lib/open_food_network/users_and_enterprises_report.rb'
# Offense count: 5
# Configuration parameters: EnforcedStyle.
# SupportedStyles: annotated, template, unannotated
Style/FormatStringToken:
Exclude:
- 'app/helpers/order_cycles_helper.rb'
- 'lib/open_food_network/sales_tax_report.rb'
- 'spec/models/enterprise_spec.rb'
# Offense count: 69
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
- 'app/controllers/admin/enterprises_controller.rb'
- 'app/controllers/admin/order_cycles_controller.rb'
- 'app/controllers/admin/product_import_controller.rb'
- 'app/controllers/application_controller.rb'
- 'app/controllers/base_controller.rb'
- 'app/controllers/checkout_controller.rb'
- 'app/controllers/home_controller.rb'
- 'app/controllers/spree/admin/adjustments_controller_decorator.rb'
- 'app/controllers/spree/admin/base_controller_decorator.rb'
- 'app/controllers/spree/admin/orders_controller_decorator.rb'
- 'app/controllers/spree/admin/products_controller_decorator.rb'
- 'app/controllers/spree/admin/resource_controller_decorator.rb'
- 'app/controllers/spree/admin/variants_controller_decorator.rb'
- 'app/controllers/spree/orders_controller_decorator.rb'
- 'app/controllers/spree/paypal_controller_decorator.rb'
- 'app/jobs/products_cache_integrity_checker_job.rb'
- 'app/models/enterprise.rb'
- 'app/models/enterprise_group.rb'
- 'app/models/producer_property.rb'
- 'app/models/spree/classification_decorator.rb'
- 'app/models/spree/order_decorator.rb'
- 'app/models/spree/preference_decorator.rb'
- 'app/models/spree/product_decorator.rb'
- 'app/models/spree/user_decorator.rb'
- 'app/services/advance_order_service.rb'
- 'app/services/order_syncer.rb'
- 'lib/discourse/single_sign_on.rb'
- 'lib/open_food_network/order_cycle_form_applicator.rb'
- 'lib/open_food_network/products_cache.rb'
- 'lib/open_food_network/products_renderer.rb'
- 'lib/open_food_network/rack_request_blocker.rb'
- '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'
- 'spec/support/delayed_job_helper.rb'
- 'spec/support/request/distribution_helper.rb'
- 'spec/support/request/shop_workflow.rb'
# Offense count: 3
Style/IfInsideElse:
Exclude:
- 'app/controllers/admin/column_preferences_controller.rb'
- 'app/controllers/admin/variant_overrides_controller.rb'
- 'app/controllers/spree/admin/products_controller_decorator.rb'
# Offense count: 1
Style/MissingRespondToMissing:
Exclude:
- 'app/helpers/application_helper.rb'
# Offense count: 5
Style/MixinUsage:
Exclude:
- 'lib/open_food_network/orders_and_fulfillments_report.rb'
- 'spec/features/admin/orders_spec.rb'
- 'spec/lib/open_food_network/bulk_coop_report_spec.rb'
- 'spec/lib/open_food_network/order_cycle_management_report_spec.rb'
- 'spec/lib/open_food_network/packing_report_spec.rb'
# Offense count: 2
Style/NestedTernaryOperator:
Exclude:
- 'app/views/spree/api/products/bulk_show.v1.rabl'
- 'app/views/spree/api/variants/bulk_show.v1.rabl'
# Offense count: 10
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
Exclude:
- 'spec/**/*'
- 'app/helpers/checkout_helper.rb'
- 'app/models/spree/calculator/flexi_rate_decorator.rb'
- 'app/models/spree/line_item_decorator.rb'
- 'app/models/spree/order_decorator.rb'
- 'lib/open_food_network/integrity_checker.rb'
- 'lib/open_food_network/rack_request_blocker.rb'
- 'lib/open_food_network/xero_invoices_report.rb'
- 'lib/spree/money_decorator.rb'
# Offense count: 15
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed
Style/RegexpLiteral:
Exclude:
- 'app/helpers/groups_helper.rb'
- 'app/helpers/html_helper.rb'
- 'app/models/enterprise.rb'
- 'app/models/enterprise_group.rb'
- 'app/models/spree/preference_decorator.rb'
- 'lib/discourse/single_sign_on.rb'
- 'spec/mailers/subscription_mailer_spec.rb'
- 'spec/models/content_configuration_spec.rb'
# Offense count: 243
Style/Send:
Exclude:
- 'app/models/spree/shipping_method_decorator.rb'
- 'spec/controllers/admin/subscriptions_controller_spec.rb'
- 'spec/controllers/checkout_controller_spec.rb'
- 'spec/controllers/shop_controller_spec.rb'
- 'spec/controllers/spree/admin/base_controller_spec.rb'
- 'spec/controllers/spree/orders_controller_spec.rb'
- 'spec/helpers/order_cycles_helper_spec.rb'
- 'spec/jobs/subscription_confirm_job_spec.rb'
- 'spec/jobs/subscription_placement_job_spec.rb'
- 'spec/lib/open_food_network/address_finder_spec.rb'
- 'spec/lib/open_food_network/enterprise_fee_applicator_spec.rb'
- 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb'
- 'spec/lib/open_food_network/lettuce_share_report_spec.rb'
- 'spec/lib/open_food_network/option_value_namer_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/products_and_inventory_report_spec.rb'
- 'spec/lib/open_food_network/products_cache_spec.rb'
- 'spec/lib/open_food_network/products_renderer_spec.rb'
- 'spec/lib/open_food_network/sales_tax_report_spec.rb'
- 'spec/lib/open_food_network/subscription_payment_updater_spec.rb'
- 'spec/lib/open_food_network/subscription_summarizer_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/webhook_handler_spec.rb'
- 'spec/models/enterprise_spec.rb'
- 'spec/models/exchange_spec.rb'
- 'spec/models/spree/gateway/stripe_connect_spec.rb'
- 'spec/models/spree/order_spec.rb'
- 'spec/models/spree/payment_spec.rb'
- 'spec/models/spree/preference_spec.rb'
- 'spec/models/spree/tax_rate_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/services/cart_service_spec.rb'
- 'spec/spec_helper.rb'
- 'spec/support/localized_number_helper.rb'
- 'spec/support/matchers/delegate_matchers.rb'
# Offense count: 1
Style/StructInheritance:
Exclude:
- 'lib/open_food_network/enterprise_fee_applicator.rb'
You can’t perform that action at this time.