diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 287ff33463..727207a1d3 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.52.1. +# using RuboCop version 1.54.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 @@ -16,7 +16,7 @@ Gemspec/RequiredRubyVersion: - 'engines/order_management/order_management.gemspec' - 'engines/web/web.gemspec' -# Offense count: 31 +# Offense count: 32 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: with_first_argument, with_fixed_indentation @@ -97,7 +97,7 @@ Layout/FirstHashElementIndentation: Exclude: - 'spec/services/products_renderer_spec.rb' -# Offense count: 10 +# Offense count: 13 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. # SupportedHashRocketStyles: key, separator, table @@ -138,56 +138,16 @@ Layout/LeadingCommentSpace: Exclude: - 'spec/system/admin/enterprises_spec.rb' -# Offense count: 105 +# Offense count: 4 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: space, no_space Layout/LineContinuationSpacing: Exclude: - - 'spec/system/admin/bulk_order_management_spec.rb' - - 'spec/system/admin/configuration/content_spec.rb' - - 'spec/system/admin/customers_spec.rb' - 'spec/system/admin/enterprise_fees_spec.rb' - - 'spec/system/admin/enterprises/index_spec.rb' - - 'spec/system/admin/enterprises_spec.rb' - - 'spec/system/admin/order_cycles/list_spec.rb' - - 'spec/system/admin/order_cycles/simple_spec.rb' - 'spec/system/admin/order_spec.rb' - - 'spec/system/admin/orders_spec.rb' - - 'spec/system/admin/overview_spec.rb' - - 'spec/system/admin/payment_method_spec.rb' - - 'spec/system/admin/product_import_spec.rb' - - 'spec/system/admin/subscriptions_spec.rb' - - 'spec/system/admin/tag_rules_spec.rb' - - 'spec/system/admin/users_spec.rb' - - 'spec/system/admin/variant_overrides_spec.rb' - - 'spec/system/consumer/authentication_spec.rb' - - 'spec/system/consumer/caching/shops_caching_spec.rb' - - 'spec/system/consumer/cookies_spec.rb' - - 'spec/system/consumer/shopping/cart_spec.rb' - - 'spec/system/consumer/shopping/checkout_spec.rb' - - 'spec/system/consumer/shopping/products_spec.rb' - - 'spec/system/consumer/shopping/shopping_spec.rb' - - 'spec/system/consumer/shopping/unit_price_spec.rb' - - 'spec/system/consumer/split_checkout_spec.rb' -# Offense count: 13 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle, IndentationWidth. -# SupportedStyles: aligned, indented -Layout/LineEndStringConcatenationIndentation: - Exclude: - - 'spec/system/admin/configuration/content_spec.rb' - - 'spec/system/admin/customers_spec.rb' - - 'spec/system/admin/overview_spec.rb' - - 'spec/system/admin/payment_method_spec.rb' - - 'spec/system/admin/subscriptions_spec.rb' - - 'spec/system/admin/tag_rules_spec.rb' - - 'spec/system/consumer/caching/shops_caching_spec.rb' - - 'spec/system/consumer/cookies_spec.rb' - - 'spec/system/consumer/shopping/cart_spec.rb' - -# Offense count: 209 +# Offense count: 77 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. # URISchemes: http, https @@ -208,38 +168,11 @@ Layout/LineLength: - 'spec/models/spree/adjustment_spec.rb' - 'spec/models/spree/line_item_spec.rb' - 'spec/models/spree/product_spec.rb' - - 'spec/models/spree/tax_rate_spec.rb' - - 'spec/models/spree/user_spec.rb' - 'spec/models/spree/variant_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/models/variant_override_spec.rb' - 'spec/requests/api/orders_spec.rb' - - 'spec/requests/checkout/failed_checkout_spec.rb' - - 'spec/serializers/api/admin/exchange_serializer_spec.rb' - - 'spec/serializers/api/admin/order_cycle_serializer_spec.rb' - - 'spec/services/address_geocoder_spec.rb' - - 'spec/services/cart_service_spec.rb' - - 'spec/services/checkout/post_checkout_actions_spec.rb' - - 'spec/services/content_sanitizer_spec.rb' - - 'spec/services/embedded_page_service_spec.rb' - - 'spec/services/exchange_products_renderer_spec.rb' - - 'spec/services/order_cycle_distributed_variants_spec.rb' - - 'spec/services/order_syncer_spec.rb' - - 'spec/services/paypal_items_builder_spec.rb' - - 'spec/services/permissions/order_spec.rb' - - 'spec/services/permitted_attributes/order_cycle_spec.rb' - - 'spec/services/product_tag_rules_filterer_spec.rb' - - 'spec/services/products_renderer_spec.rb' - - 'spec/support/cancan_helper.rb' - - 'spec/support/features/datepicker_helper.rb' - - 'spec/support/matchers/select2_matchers.rb' - 'spec/support/request/web_helper.rb' - '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' @@ -404,6 +337,12 @@ Lint/NonAtomicFileOperation: Exclude: - 'app/services/bulk_invoice_service.rb' +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Lint/RedundantCopDisableDirective: + Exclude: + - 'app/components/product_component.rb' + # Offense count: 4 # This cop supports unsafe autocorrection (--autocorrect-all). Lint/RedundantDirGlobSort: @@ -477,7 +416,7 @@ Metrics/AbcSize: - 'lib/tasks/enterprises.rake' - 'spec/services/order_checkout_restart_spec.rb' -# Offense count: 48 +# Offense count: 45 # Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns. # AllowedMethods: refine Metrics/BlockLength: @@ -509,7 +448,6 @@ Metrics/BlockLength: - 'spec/system/consumer/shopping/checkout_spec.rb' - 'spec/system/consumer/shopping/checkout_stripe_spec.rb' - 'spec/system/consumer/shopping/variant_overrides_spec.rb' - - 'spec/system/consumer/split_checkout_tax_not_incl_spec.rb' # Offense count: 1 # Configuration parameters: CountBlocks, Max. @@ -1197,7 +1135,7 @@ Rails/UnknownEnv: Exclude: - 'app/models/spree/app_configuration.rb' -# Offense count: 55 +# Offense count: 56 # This cop supports unsafe autocorrection (--autocorrect-all). Rails/WhereEquals: Exclude: @@ -1438,7 +1376,7 @@ Style/HashLikeCase: Exclude: - 'app/models/enterprise.rb' -# Offense count: 1780 +# Offense count: 1782 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys @@ -1882,7 +1820,7 @@ Style/NestedModifier: - 'spec/system/admin/payments_stripe_spec.rb' - 'spec/system/admin/reports_spec.rb' -# Offense count: 36 +# Offense count: 38 Style/OpenStructUse: Exclude: - 'app/helpers/injection_helper.rb' @@ -1976,11 +1914,12 @@ Style/RedundantInitialize: Exclude: - 'spec/models/spree/gateway_spec.rb' -# Offense count: 1 +# Offense count: 2 # This cop supports safe autocorrection (--autocorrect). -Style/RedundantRegexpEscape: +Style/RedundantRegexpArgument: Exclude: - - 'app/models/spree/order.rb' + - 'app/models/spree/shipping_method.rb' + - 'lib/spree/i18n.rb' # Offense count: 4 # This cop supports safe autocorrection (--autocorrect). @@ -1990,6 +1929,15 @@ Style/RedundantStringEscape: - 'spec/controllers/spree/admin/shipping_methods_controller_spec.rb' - 'spec/system/admin/enterprise_fees_spec.rb' +# Offense count: 19 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowedMethods, AllowedPatterns. +Style/ReturnNilInPredicateMethodDefinition: + Exclude: + - 'app/models/order_cycle.rb' + - 'app/serializers/api/admin/customer_serializer.rb' + - 'engines/order_management/app/services/order_management/subscriptions/validator.rb' + # Offense count: 205 Style/Send: Exclude: