diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 4abfdc4d3a..b0b1d1447c 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 1400 --no-auto-gen-timestamp` -# using RuboCop version 1.50.2. +# using RuboCop version 1.51.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 @@ -100,7 +100,7 @@ Layout/FirstHashElementIndentation: Exclude: - 'spec/services/products_renderer_spec.rb' -# Offense count: 11 +# Offense count: 10 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. # SupportedHashRocketStyles: key, separator, table @@ -109,7 +109,6 @@ Layout/FirstHashElementIndentation: Layout/HashAlignment: Exclude: - 'app/controllers/spree/users_controller.rb' - - 'app/models/spree/image.rb' - 'spec/migrations/migrate_customer_names_spec.rb' - 'spec/models/enterprise_spec.rb' - 'spec/system/admin/customers_spec.rb' @@ -142,7 +141,7 @@ Layout/LeadingCommentSpace: Exclude: - 'spec/system/admin/enterprises_spec.rb' -# Offense count: 114 +# Offense count: 115 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: space, no_space @@ -199,12 +198,13 @@ Layout/LineEndStringConcatenationIndentation: - 'spec/system/consumer/cookies_spec.rb' - 'spec/system/consumer/shopping/cart_spec.rb' -# Offense count: 615 +# Offense count: 643 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. # URISchemes: http, https Layout/LineLength: Exclude: + - 'app/components/confirm_modal_component.rb' - 'app/controllers/admin/bulk_line_items_controller.rb' - 'app/controllers/admin/enterprise_fees_controller.rb' - 'app/controllers/admin/enterprise_relationships_controller.rb' @@ -367,6 +367,8 @@ Layout/LineLength: - 'spec/system/admin/adjustments_spec.rb' - 'spec/system/admin/bulk_order_management_spec.rb' - 'spec/system/admin/bulk_product_update_spec.rb' + - 'spec/system/admin/order_spec.rb' + - 'spec/system/admin/product_import_spec.rb' # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). @@ -412,7 +414,7 @@ Layout/TrailingEmptyLines: Exclude: - 'Rakefile' -# Offense count: 70 +# Offense count: 73 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowInHeredoc. Layout/TrailingWhitespace: @@ -420,7 +422,6 @@ Layout/TrailingWhitespace: - 'app/controllers/spree/users_controller.rb' - 'app/controllers/user_confirmations_controller.rb' - 'app/models/enterprise.rb' - - 'app/models/spree/image.rb' - 'spec/controllers/spree/credit_cards_controller_spec.rb' - 'spec/controllers/user_confirmations_controller_spec.rb' - 'spec/factories/order_factory.rb' @@ -438,7 +439,6 @@ Layout/TrailingWhitespace: - 'spec/system/admin/order_spec.rb' - 'spec/system/admin/product_import_spec.rb' - 'spec/system/admin/shipping_methods_spec.rb' - - 'spec/system/consumer/split_checkout_spec.rb' # Offense count: 7 # This cop supports safe autocorrection (--autocorrect). @@ -468,7 +468,7 @@ Lint/ConstantDefinitionInBlock: - 'spec/validators/date_time_string_validator_spec.rb' - 'spec/validators/integer_array_validator_spec.rb' -# Offense count: 8 +# Offense count: 6 # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches. Lint/DuplicateBranch: Exclude: @@ -581,6 +581,7 @@ Lint/UselessMethodDefinition: - 'app/models/spree/gateway.rb' # Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: CheckForMethodsWithNoSideEffects. Lint/Void: Exclude: @@ -651,7 +652,7 @@ Metrics/BlockNesting: Exclude: - 'app/models/spree/payment/processing.rb' -# Offense count: 46 +# Offense count: 47 # Configuration parameters: CountComments, Max, CountAsOne. Metrics/ClassLength: Exclude: @@ -659,7 +660,6 @@ Metrics/ClassLength: - 'app/controllers/admin/enterprise_fees_controller.rb' - 'app/controllers/admin/enterprises_controller.rb' - 'app/controllers/admin/order_cycles_controller.rb' - - 'app/controllers/admin/product_import_controller.rb' - 'app/controllers/admin/resource_controller.rb' - 'app/controllers/admin/schedules_controller.rb' - 'app/controllers/admin/subscriptions_controller.rb' @@ -704,7 +704,7 @@ Metrics/ClassLength: - 'lib/reporting/reports/enterprise_fee_summary/scope.rb' - 'lib/reporting/reports/xero_invoices/base.rb' -# Offense count: 35 +# Offense count: 36 # Configuration parameters: AllowedMethods, AllowedPatterns, Max. Metrics/CyclomaticComplexity: Exclude: @@ -759,7 +759,7 @@ Metrics/MethodLength: - 'lib/reporting/reports/xero_invoices/base.rb' - 'lib/tasks/sample_data/product_factory.rb' -# Offense count: 50 +# Offense count: 49 # Configuration parameters: CountComments, Max, CountAsOne. Metrics/ModuleLength: Exclude: @@ -808,16 +808,16 @@ Metrics/ModuleLength: - 'spec/models/spree/product_spec.rb' - 'spec/models/spree/shipping_method_spec.rb' - 'spec/models/spree/tax_rate_spec.rb' - - 'spec/models/spree/variant_spec.rb' - 'spec/services/permissions/order_spec.rb' - 'spec/services/variant_units/option_value_namer_spec.rb' - 'spec/support/request/shop_workflow.rb' - 'spec/support/request/stripe_stubs.rb' -# Offense count: 7 +# Offense count: 8 # Configuration parameters: Max, CountKeywordArgs, MaxOptionalParameters. Metrics/ParameterLists: Exclude: + - 'app/components/confirm_modal_component.rb' - 'app/helpers/angular_form_builder.rb' - 'app/models/product_import/entry_processor.rb' - 'lib/reporting/reports/xero_invoices/base.rb' @@ -852,6 +852,7 @@ Naming/HeredocDelimiterNaming: - 'app/models/content_configuration.rb' # Offense count: 5 +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyleForLeadingUnderscores. # SupportedStylesForLeadingUnderscores: disallowed, required, optional Naming/MemoizedInstanceVariableName: @@ -930,12 +931,6 @@ Rails/ApplicationController: Exclude: - 'engines/dfc_provider/app/controllers/dfc_provider/base_controller.rb' -# Offense count: 1 -# This cop supports unsafe autocorrection (--autocorrect-all). -Rails/ApplicationJob: - Exclude: - - 'app/jobs/report_job.rb' - # Offense count: 5 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent. @@ -1083,7 +1078,6 @@ Rails/InverseOf: Exclude: - 'app/models/enterprise.rb' - 'app/models/order_cycle.rb' - - 'app/models/spree/adjustment.rb' - 'app/models/spree/country.rb' - 'app/models/spree/inventory_unit.rb' - 'app/models/spree/line_item.rb' @@ -1122,7 +1116,7 @@ Rails/LexicallyScopedActionFilter: - 'app/controllers/spree/admin/zones_controller.rb' - 'app/controllers/spree/users_controller.rb' -# Offense count: 9 +# Offense count: 8 # This cop supports unsafe autocorrection (--autocorrect-all). Rails/NegateInclude: Exclude: @@ -1131,11 +1125,10 @@ Rails/NegateInclude: - 'app/models/product_import/spreadsheet_entry.rb' - 'app/models/spree/order/checkout.rb' - 'app/services/order_cart_reset.rb' - - 'engines/order_management/app/services/order_management/stock/estimator.rb' - 'lib/spree/localized_number.rb' - 'spec/support/matchers/table_matchers.rb' -# Offense count: 18 +# Offense count: 17 Rails/OutputSafety: Exclude: - 'app/helpers/angular_form_helper.rb' @@ -1180,7 +1173,7 @@ Rails/PluckInWhere: Exclude: - 'app/models/spree/variant.rb' -# Offense count: 28 +# Offense count: 30 # This cop supports unsafe autocorrection (--autocorrect-all). Rails/RedundantPresenceValidationOnBelongsTo: Exclude: @@ -1690,7 +1683,7 @@ Style/RedundantStringEscape: - 'spec/controllers/spree/admin/shipping_methods_controller_spec.rb' - 'spec/system/admin/enterprise_fees_spec.rb' -# Offense count: 206 +# Offense count: 208 Style/Send: Exclude: - 'app/controllers/split_checkout_controller.rb' @@ -1740,7 +1733,7 @@ Style/SlicingWithRange: - 'engines/order_management/app/services/order_management/subscriptions/validator.rb' - 'lib/discourse/single_sign_on.rb' -# Offense count: 29 +# Offense count: 28 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Mode. Style/StringConcatenation: @@ -1761,7 +1754,6 @@ Style/StringConcatenation: - 'lib/spree/core/environment_extension.rb' - 'spec/models/spree/line_item_spec.rb' - 'spec/models/spree/product_spec.rb' - - 'spec/models/spree/variant_spec.rb' - 'spec/services/embedded_page_service_spec.rb' - 'spec/support/api_helper.rb' - 'spec/support/features/datepicker_helper.rb'