From a7944af73d3da44a32c34f2e92a188cfb6c88448 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Tue, 13 Jul 2021 22:32:28 +0100 Subject: [PATCH] Update rubocop todo file --- .rubocop_todo.yml | 120 ++++++++++++++++------------------------------ 1 file changed, 42 insertions(+), 78 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d6472a4406..885cca95d0 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --exclude-limit 1400` -# on 2021-06-17 21:32:23 UTC using RuboCop version 1.17.0. +# on 2021-07-13 21:27:42 UTC using RuboCop version 1.18.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 @@ -16,12 +16,24 @@ Gemspec/RequiredRubyVersion: - 'engines/order_management/order_management.gemspec' - 'engines/web/web.gemspec' -# Offense count: 25 +# Offense count: 3 # Cop supports --auto-correct. -# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. -# URISchemes: http, https -Layout/LineLength: - Max: 148 +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: with_first_argument, with_fixed_indentation +Layout/ArgumentAlignment: + Exclude: + - 'app/models/spree/stock/availability_validator.rb' + - 'spec/features/consumer/account/payments_spec.rb' + - 'spec/queries/payments_requiring_action_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: symmetrical, new_line, same_line +Layout/MultilineMethodCallBraceLayout: + Exclude: + - 'spec/features/consumer/account/payments_spec.rb' + - 'spec/queries/payments_requiring_action_spec.rb' # Offense count: 15 # Configuration parameters: AllowedMethods. @@ -88,46 +100,10 @@ Lint/UselessMethodDefinition: - 'app/controllers/spree/user_registrations_controller.rb' - 'app/models/spree/gateway.rb' -# Offense count: 13 -# Configuration parameters: IgnoredMethods, CountRepeatedAttributes. -Metrics/AbcSize: - Max: 25 - -# Offense count: 3 -# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. -# IgnoredMethods: refine -Metrics/BlockLength: - Max: 30 - -# Offense count: 3 -# Configuration parameters: CountComments, CountAsOne. -Metrics/ClassLength: - Max: 122 - # Offense count: 1 -# Configuration parameters: IgnoredMethods. -Metrics/CyclomaticComplexity: - Max: 9 - -# Offense count: 10 -# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. -Metrics/MethodLength: - Max: 17 - -# Offense count: 2 -# Configuration parameters: CountComments, CountAsOne. -Metrics/ModuleLength: - Max: 369 - -# Offense count: 2 -# Configuration parameters: Max, CountKeywordArgs. -Metrics/ParameterLists: - MaxOptionalParameters: 4 - -# Offense count: 3 -# Configuration parameters: IgnoredMethods. -Metrics/PerceivedComplexity: - Max: 10 +# Configuration parameters: CountBlocks. +Metrics/BlockNesting: + Max: 4 # Offense count: 9 Naming/AccessorMethodName: @@ -181,12 +157,6 @@ Naming/VariableNumber: - 'spec/models/spree/tax_rate_spec.rb' - 'spec/requests/api/orders_spec.rb' -# Offense count: 2 -# Cop supports --auto-correct. -Rails/ActiveRecordAliases: - Exclude: - - 'app/models/spree/order_contents.rb' - # Offense count: 1 # Configuration parameters: Include. # Include: app/models/**/*.rb @@ -222,25 +192,16 @@ Rails/ApplicationRecord: Exclude: - 'lib/tasks/data/remove_transient_data.rb' -# Offense count: 6 +# Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent. Rails/Blank: Exclude: - - 'app/jobs/subscription_placement_job.rb' - 'app/models/spree/order_contents.rb' - 'app/services/content_sanitizer.rb' - 'engines/order_management/app/services/order_management/stock/package.rb' - 'lib/stripe/authorize_response_patcher.rb' -# Offense count: 3 -# Configuration parameters: EnforcedStyle. -# SupportedStyles: strict, flexible -Rails/Date: - Exclude: - - 'app/models/order_cycle.rb' - - 'app/models/spree/credit_card.rb' - # Offense count: 15 # Configuration parameters: EnforcedStyle. # SupportedStyles: slashes, arguments @@ -258,18 +219,6 @@ Rails/FilePath: - 'spec/serializers/api/admin/enterprise_serializer_spec.rb' - 'spec/support/downloads_helper.rb' -# Offense count: 7 -# Cop supports --auto-correct. -# Configuration parameters: Include. -# Include: app/models/**/*.rb -Rails/FindBy: - Exclude: - - 'app/models/enterprise.rb' - - 'app/models/product_import/entry_processor.rb' - - 'app/models/product_import/entry_validator.rb' - - 'app/models/product_import/spreadsheet_data.rb' - - 'app/models/spree/user.rb' - # Offense count: 11 # Configuration parameters: Include. # Include: app/models/**/*.rb @@ -406,7 +355,6 @@ Rails/SkipsModelValidations: - 'app/controllers/spree/admin/taxons_controller.rb' - 'app/controllers/spree/credit_cards_controller.rb' - 'app/jobs/subscription_confirm_job.rb' - - 'app/jobs/subscription_placement_job.rb' - 'app/models/concerns/line_item_stock_changes.rb' - 'app/models/enterprise.rb' - 'app/models/enterprise_relationship.rb' @@ -431,6 +379,7 @@ Rails/SkipsModelValidations: - 'app/models/subscription.rb' - 'app/models/variant_override.rb' - 'app/services/order_factory.rb' + - 'app/services/place_proxy_order.rb' - 'engines/order_management/app/services/order_management/order/updater.rb' - 'engines/order_management/spec/services/order_management/reports/enterprise_fee_summary/report_service_spec.rb' - 'engines/order_management/spec/services/order_management/subscriptions/stripe_payment_setup_spec.rb' @@ -473,7 +422,6 @@ Rails/SkipsModelValidations: - 'spec/features/consumer/shopping/unit_price_spec.rb' - 'spec/helpers/enterprises_helper_spec.rb' - 'spec/helpers/order_cycles_helper_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_calculator_spec.rb' - 'spec/lib/open_food_network/permissions_spec.rb' @@ -498,6 +446,7 @@ Rails/SkipsModelValidations: - 'spec/queries/outstanding_balance_spec.rb' - 'spec/serializers/api/admin/subscription_line_item_serializer_spec.rb' - 'spec/services/cache_service_spec.rb' + - 'spec/services/cap_quantity_spec.rb' - 'spec/services/order_cart_reset_spec.rb' - 'spec/services/order_checkout_restart_spec.rb' - 'spec/services/order_cycle_distributed_products_spec.rb' @@ -533,7 +482,7 @@ Rails/UniqueValidationWithoutIndex: - 'app/models/spree/tax_category.rb' - 'app/models/spree/zone.rb' -# Offense count: 3 +# Offense count: 2 # Configuration parameters: Environments. # Environments: development, test, production Rails/UnknownEnv: @@ -598,6 +547,14 @@ Style/ClassVars: Style/FormatStringToken: EnforcedStyle: unannotated +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: always, always_true, never +Style/FrozenStringLiteralComment: + Exclude: + - '.simplecov' + # Offense count: 6 # Cop supports --auto-correct. Style/GlobalStdStream: @@ -664,9 +621,9 @@ Style/NestedModifier: - 'spec/factories/order_factory.rb' - 'spec/features/admin/payments_stripe_spec.rb' - 'spec/features/admin/reports_spec.rb' - - 'spec/jobs/subscription_placement_job_spec.rb' - 'spec/models/proxy_order_spec.rb' - 'spec/models/spree/line_item_spec.rb' + - 'spec/services/place_proxy_order_spec.rb' # Offense count: 34 # Cop supports --auto-correct. @@ -731,7 +688,13 @@ Style/PreferredHashMethods: Exclude: - 'app/controllers/api/v0/shipments_controller.rb' -# Offense count: 236 +# Offense count: 2 +# Cop supports --auto-correct. +Style/RedundantSelf: + Exclude: + - 'app/models/spree/payment/processing.rb' + +# Offense count: 223 Style/Send: Exclude: - 'engines/order_management/spec/services/order_management/reports/bulk_coop/bulk_coop_report_spec.rb' @@ -791,6 +754,7 @@ Style/SlicingWithRange: # Offense count: 43 # Cop supports --auto-correct. +# Configuration parameters: Mode. Style/StringConcatenation: Exclude: - 'app/controllers/admin/stripe_connect_settings_controller.rb'