From e3ae65fad5097c3f88a0ae2002a0b8ac4b41e42b Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Sun, 22 Dec 2019 15:36:35 +0100 Subject: [PATCH] Update rubocop_todo --- .rubocop_todo.yml | 252 +++++++++++++--------------------------------- 1 file changed, 71 insertions(+), 181 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 87b43474cb..7be6d93eb5 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,11 +1,19 @@ # This configuration was generated by # `rubocop --auto-gen-config --exclude-limit 1400` -# on 2020-01-09 11:26:09 +1100 using RuboCop version 0.79.0. +# on 2019-12-22 15:36:14 +0100 using RuboCop version 0.78.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: TreatCommentsAsGroupSeparators, Include. +# Include: **/*.gemfile, **/Gemfile, **/gems.rb +Bundler/OrderedGems: + Exclude: + - 'Gemfile' + # Offense count: 6 # Cop supports --auto-correct. Layout/EmptyLineAfterGuardClause: @@ -14,10 +22,11 @@ Layout/EmptyLineAfterGuardClause: - 'lib/open_food_network/orders_and_fulfillments_report.rb' - 'lib/open_food_network/packing_report.rb' -# Offense count: 1 +# Offense count: 2 # Cop supports --auto-correct. Layout/EmptyLines: Exclude: + - 'app/models/spree/adjustment_decorator.rb' - 'spec/features/admin/order_cycles_spec.rb' # Offense count: 1 @@ -28,7 +37,15 @@ Layout/EmptyLinesAroundBlockBody: Exclude: - 'spec/controllers/api/orders_controller_spec.rb' -# Offense count: 2 +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity. +# SupportedStylesAlignWith: keyword, variable, start_of_line +Layout/EndAlignment: + Exclude: + - 'lib/open_food_network/permalink_generator.rb' + +# Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. # SupportedHashRocketStyles: key, separator, table @@ -36,8 +53,18 @@ Layout/EmptyLinesAroundBlockBody: # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit Layout/HashAlignment: Exclude: + - 'app/models/enterprise.rb' - 'spec/lib/open_food_network/orders_and_fulfillments_report/customer_totals_report_spec.rb' +# Offense count: 9 +# Cop supports --auto-correct. +# Configuration parameters: AllowDoxygenCommentStyle. +Layout/LeadingCommentSpace: + Exclude: + - 'Gemfile' + - 'app/helpers/application_helper.rb' + - 'app/models/enterprise.rb' + # Offense count: 27 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. @@ -45,6 +72,12 @@ Layout/HashAlignment: Layout/LineLength: Max: 129 +# Offense count: 1 +# Cop supports --auto-correct. +Layout/SpaceAfterColon: + Exclude: + - 'lib/open_food_network/order_cycle_form_applicator.rb' + # Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator. @@ -73,11 +106,6 @@ Lint/DuplicateMethods: - 'lib/discourse/single_sign_on.rb' - 'lib/open_food_network/subscription_summary.rb' -# Offense count: 1 -Lint/DuplicateHashKey: - Exclude: - - 'spec/models/calculator/weight_spec.rb' - # Offense count: 10 Lint/IneffectiveAccessModifier: Exclude: @@ -122,6 +150,12 @@ Lint/UselessAccessModifier: - 'lib/open_food_network/reports/bulk_coop_report.rb' - 'spec/lib/open_food_network/reports/report_spec.rb' +# Offense count: 1 +Lint/UselessAssignment: + Exclude: + - 'spec/**/*' + - 'app/models/enterprise.rb' + # Offense count: 1 # Configuration parameters: CheckForMethodsWithNoSideEffects. Lint/Void: @@ -149,13 +183,27 @@ Naming/HeredocDelimiterNaming: Exclude: - 'app/models/content_configuration.rb' -# Offense count: 4 +# Offense count: 5 # Configuration parameters: EnforcedStyleForLeadingUnderscores. # SupportedStylesForLeadingUnderscores: disallowed, required, optional Naming/MemoizedInstanceVariableName: Exclude: - 'app/controllers/spree/admin/payments_controller_decorator.rb' - 'lib/open_food_network/address_finder.rb' + - 'lib/spree/authentication_helpers.rb' + +# Offense count: 8 +# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. +# AllowedNames: io, id, to, by, on, in, at, ip, db, os +Naming/MethodParameterName: + Exclude: + - 'app/helpers/spree/admin/base_helper_decorator.rb' + - 'app/helpers/spree/base_helper_decorator.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: 8 # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. @@ -197,173 +245,19 @@ Naming/PredicateName: - 'lib/open_food_network/packing_report.rb' - 'lib/tasks/data.rake' -# Offense count: 8 -# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. -# AllowedNames: io, id, to, by, on, in, at, ip, db -Naming/MethodParameterName: - Exclude: - - 'app/controllers/admin/column_preferences_controller.rb' - - 'app/controllers/admin/customers_controller.rb' - - 'app/controllers/admin/enterprise_fees_controller.rb' - - 'app/controllers/admin/enterprise_groups_controller.rb' - - 'app/controllers/admin/enterprises_controller.rb' - - 'app/controllers/admin/order_cycles_controller.rb' - - 'app/controllers/admin/producer_properties_controller.rb' - - 'app/controllers/admin/product_import_controller.rb' - - 'app/controllers/admin/schedules_controller.rb' - - 'app/controllers/admin/stripe_connect_settings_controller.rb' - - 'app/controllers/admin/subscription_line_items_controller.rb' - - 'app/controllers/admin/subscriptions_controller.rb' - - 'app/controllers/admin/variant_overrides_controller.rb' - - 'app/controllers/api/base_controller.rb' - - 'app/controllers/api/enterprise_attachment_controller.rb' - - 'app/controllers/api/enterprises_controller.rb' - - 'app/controllers/api/shipments_controller.rb' - - 'app/controllers/api/variants_controller.rb' - - 'app/controllers/application_controller.rb' - - 'app/controllers/base_controller.rb' - - 'app/controllers/cart_controller.rb' - - 'app/controllers/checkout_controller.rb' - - 'app/controllers/discourse_sso_controller.rb' - - 'app/controllers/enterprises_controller.rb' - - 'app/controllers/home_controller.rb' - - 'app/controllers/line_items_controller.rb' - - 'app/controllers/producers_controller.rb' - - 'app/controllers/registration_controller.rb' - - 'app/controllers/shop_controller.rb' - - 'app/controllers/shops_controller.rb' - - 'app/controllers/spree/admin/adjustments_controller.rb' - - 'app/controllers/spree/admin/base_controller.rb' - - 'app/controllers/spree/admin/images_controller.rb' - - 'app/controllers/spree/admin/mail_methods_controller.rb' - - 'app/controllers/spree/admin/orders/customer_details_controller_decorator.rb' - - 'app/controllers/spree/admin/orders_controller_decorator.rb' - - 'app/controllers/spree/admin/payment_methods_controller.rb' - - 'app/controllers/spree/admin/payments_controller_decorator.rb' - - 'app/controllers/spree/admin/product_properties_controller.rb' - - 'app/controllers/spree/admin/products_controller_decorator.rb' - - 'app/controllers/spree/admin/reports/enterprise_fee_summaries_controller.rb' - - 'app/controllers/spree/admin/reports_controller.rb' - - 'app/controllers/spree/admin/shipping_methods_controller.rb' - - 'app/controllers/spree/admin/states_controller.rb' - - 'app/controllers/spree/admin/tax_rates_controller.rb' - - 'app/controllers/spree/admin/users_controller.rb' - - 'app/controllers/spree/admin/zones_controller.rb' - - 'app/controllers/spree/checkout_controller.rb' - - 'app/controllers/spree/orders_controller.rb' - - 'app/controllers/spree/paypal_controller_decorator.rb' - - 'app/controllers/spree/store_controller.rb' - - 'app/controllers/spree/user_registrations_controller.rb' - - 'app/controllers/spree/user_sessions_controller.rb' - - 'app/controllers/spree/users_controller.rb' - - 'app/controllers/stripe/webhooks_controller.rb' - - 'app/controllers/user_passwords_controller.rb' - - 'app/controllers/user_registrations_controller.rb' - -# Offense count: 1 +# Offense count: 13 +# Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. -# SupportedStyles: strict, flexible -Rails/Date: +# SupportedStyles: braces, no_braces, context_dependent +Style/BracesAroundHashParameters: Exclude: - - 'app/models/order_cycle.rb' - -# Offense count: 16 -# Configuration parameters: EnforcedStyle. -# SupportedStyles: slashes, arguments -Rails/FilePath: - Exclude: - - 'app/models/product_import/product_importer.rb' - - 'lib/tasks/karma.rake' - - 'spec/controllers/api/logos_controller_spec.rb' - - 'spec/controllers/api/product_images_controller_spec.rb' - - 'spec/controllers/api/promo_images_controller_spec.rb' - - 'spec/factories/product_factory.rb' - - 'spec/features/admin/content_spec.rb' - - 'spec/features/admin/enterprises/images_spec.rb' - - 'spec/models/content_configuration_spec.rb' - - 'spec/models/spree/variant_spec.rb' - - 'spec/serializers/api/admin/enterprise_serializer_spec.rb' - - 'spec/support/downloads_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: 26 -# 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.rb' - - 'app/models/spree/variant_decorator.rb' - - 'app/models/subscription.rb' - -# Offense count: 78 -# Configuration parameters: Include. -# Include: app/helpers/**/*.rb -Rails/HelperInstanceVariable: - Exclude: - - 'app/helpers/admin/injection_helper.rb' - - 'app/helpers/angular_form_builder.rb' - - 'app/helpers/application_helper.rb' - - 'app/helpers/enterprises_helper.rb' - - 'app/helpers/injection_helper.rb' - - 'app/helpers/order_cycles_helper.rb' - - 'app/helpers/shared_helper.rb' - - 'app/helpers/spree/admin/orders_helper_decorator.rb' - - 'app/helpers/spree/orders_helper.rb' - -# Offense count: 6 -Rails/OutputSafety: - Exclude: - - 'app/controllers/spree/admin/reports_controller.rb' - - 'app/helpers/angular_form_helper.rb' - - 'app/helpers/spree/admin/base_helper.rb' - - 'app/helpers/spree/admin/zones_helper.rb' - - 'app/helpers/spree/reports_helper.rb' - - 'app/helpers/spree/admin/navigation_helper.rb' - - 'app/helpers/spree/admin/orders_helper.rb' - - 'app/serializers/api/product_serializer.rb' - - 'lib/spree/money_decorator.rb' - - 'spec/features/admin/orders_spec.rb' - -# Offense count: 2 -# Configuration parameters: Include. -# Include: **/Rakefile, **/*.rake -Rails/RakeEnvironment: - Exclude: - - 'lib/tasks/specs.rake' - -# Offense count: 9 -Rails/ReflectionClassName: - Exclude: - - 'app/models/customer.rb' - - 'app/models/distributor_shipping_method.rb' - - 'app/models/enterprise_role.rb' - - 'app/models/subscription.rb' - -# Offense count: 1 -# Configuration parameters: Environments. -# Environments: development, test, production -Rails/UnknownEnv: - Exclude: - - 'app/models/spree/app_configuration_decorator.rb' + - 'app/models/spree/payment_decorator.rb' + - 'lib/open_food_network/variant_and_line_item_naming.rb' + - 'spec/features/consumer/registration_spec.rb' + - 'spec/models/enterprise_fee_spec.rb' + - 'spec/models/spree/product_spec.rb' + - 'spec/models/tag_rule/discount_order_spec.rb' + - 'spec/support/seeds.rb' # Offense count: 2 Style/CaseEquality: @@ -478,7 +372,7 @@ Style/FormatStringToken: - 'lib/open_food_network/sales_tax_report.rb' - 'spec/features/admin/bulk_order_management_spec.rb' -# Offense count: 928 +# Offense count: 925 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. # SupportedStyles: always, never @@ -580,7 +474,6 @@ Style/FrozenStringLiteralComment: - 'app/controllers/spree/credit_cards_controller.rb' - 'app/controllers/spree/home_controller.rb' - 'app/controllers/spree/orders_controller.rb' - - 'app/controllers/spree/paypal_controller_decorator.rb' - 'app/controllers/spree/store_controller.rb' - 'app/controllers/spree/user_passwords_controller.rb' - 'app/controllers/spree/user_registrations_controller.rb' @@ -1074,7 +967,6 @@ Style/FrozenStringLiteralComment: - 'spec/controllers/spree/checkout_controller_spec.rb' - 'spec/controllers/spree/credit_cards_controller_spec.rb' - 'spec/controllers/spree/orders_controller_spec.rb' - - 'spec/controllers/spree/paypal_controller_spec.rb' - 'spec/controllers/spree/store_controller_spec.rb' - 'spec/controllers/spree/user_sessions_controller_spec.rb' - 'spec/controllers/spree/users_controller_spec.rb' @@ -1277,7 +1169,6 @@ Style/FrozenStringLiteralComment: - 'spec/models/spree/classification_spec.rb' - 'spec/models/spree/credit_card_spec.rb' - 'spec/models/spree/gateway/stripe_connect_spec.rb' - - 'spec/models/spree/gateway_tagging_spec.rb' - 'spec/models/spree/image_spec.rb' - 'spec/models/spree/line_item_spec.rb' - 'spec/models/spree/order/checkout_spec.rb' @@ -1413,7 +1304,7 @@ Style/FrozenStringLiteralComment: - 'spec/views/spree/admin/orders/edit.html.haml_spec.rb' - 'spec/views/spree/admin/orders/index.html.haml_spec.rb' -# Offense count: 58 +# Offense count: 59 # Configuration parameters: MinBodyLength. Style/GuardClause: Exclude: @@ -1428,7 +1319,6 @@ Style/GuardClause: - 'app/controllers/spree/admin/variants_controller_decorator.rb' - 'app/controllers/spree/checkout_controller.rb' - 'app/controllers/spree/orders_controller.rb' - - 'app/controllers/spree/paypal_controller_decorator.rb' - 'app/models/enterprise.rb' - 'app/models/enterprise_group.rb' - 'app/models/producer_property.rb' @@ -1491,7 +1381,7 @@ Style/NegatedUnless: Exclude: - 'app/services/cart_service.rb' -# Offense count: 41 +# Offense count: 42 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods. # SupportedStyles: predicate, comparison