From 10d3abeaac369f63f649aa262a93c06fce4da958 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 26 Apr 2018 17:54:06 +1000 Subject: [PATCH] Upgrade Rubocop to the latest version --- .rubocop.yml | 6 +- .rubocop_todo.yml | 587 +++++++++++++++++++++++++++++++--------------- Gemfile.lock | 17 +- 3 files changed, 415 insertions(+), 195 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 1bd857d1d0..3edb24aad7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -143,7 +143,11 @@ Style/TrailingCommaInArguments: Enabled: false StyleGuide: http://relaxed.ruby.style/#styletrailingcommainarguments -Style/TrailingCommaInLiteral: +Style/TrailingCommaInArrayLiteral: + Enabled: false + StyleGuide: http://relaxed.ruby.style/#styletrailingcommainliteral + +Style/TrailingCommaInHashLiteral: Enabled: false StyleGuide: http://relaxed.ruby.style/#styletrailingcommainliteral diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index bd93ff1266..cf4dd57a72 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 2018-04-23 13:00:19 +0200 using RuboCop version 0.49.1. +# on 2018-05-08 14:46:01 +1000 using RuboCop version 0.55.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 @@ -9,12 +9,12 @@ # Offense count: 36 # Cop supports --auto-correct. # Configuration parameters: Include, TreatCommentsAsGroupSeparators. -# Include: **/Gemfile, **/gems.rb +# Include: **/*.gemfile, **/Gemfile, **/gems.rb Bundler/OrderedGems: Exclude: - 'Gemfile' -# Offense count: 128 +# Offense count: 124 # Cop supports --auto-correct. Layout/AlignArray: Exclude: @@ -28,9 +28,9 @@ Layout/AlignArray: - 'spec/lib/open_food_network/order_and_distributor_report_spec.rb' - 'spec/lib/open_food_network/order_grouper_spec.rb' -# Offense count: 135 +# Offense count: 127 # Cop supports --auto-correct. -# Configuration parameters: EnforcedHashRocketStyle, SupportedHashRocketStyles, EnforcedColonStyle, SupportedColonStyles, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles. +# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. # SupportedHashRocketStyles: key, separator, table # SupportedColonStyles: key, separator, table # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit @@ -43,7 +43,6 @@ Layout/AlignHash: - 'lib/open_food_network/packing_report.rb' - 'lib/open_food_network/payments_report.rb' - 'spec/archive/features/consumer/checkout_spec.rb' - - 'spec/factories.rb' - 'spec/features/admin/bulk_product_update_spec.rb' - 'spec/features/admin/order_cycles_spec.rb' - 'spec/features/admin/products_spec.rb' @@ -60,9 +59,9 @@ Layout/AlignHash: - 'spec/models/spree/shipping_method_spec.rb' - 'spec/models/spree/variant_spec.rb' -# Offense count: 58 +# Offense count: 62 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: with_first_parameter, with_fixed_indentation Layout/AlignParameters: Exclude: @@ -87,6 +86,17 @@ Layout/AlignParameters: - 'spec/serializers/variant_serializer_spec.rb' - 'spec/support/request/authentication_workflow.rb' +# Offense count: 5 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleAlignWith. +# SupportedStylesAlignWith: either, start_of_block, start_of_line +Layout/BlockAlignment: + Exclude: + - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' + - 'spec/models/enterprise_spec.rb' + - 'spec/models/spree/line_item_spec.rb' + - 'spec/models/spree/product_spec.rb' + # Offense count: 1 # Cop supports --auto-correct. Layout/BlockEndNewline: @@ -110,7 +120,7 @@ Layout/ElseAlignment: - 'app/serializers/api/admin/order_cycle_serializer.rb' - 'lib/open_food_network/sales_tax_report.rb' -# Offense count: 210 +# Offense count: 209 # Cop supports --auto-correct. Layout/EmptyLines: Exclude: @@ -201,7 +211,6 @@ Layout/EmptyLines: - 'spec/controllers/spree/api/products_controller_spec.rb' - 'spec/controllers/spree/checkout_controller_spec.rb' - 'spec/controllers/spree/orders_controller_spec.rb' - - 'spec/factories.rb' - 'spec/features/admin/bulk_product_update_spec.rb' - 'spec/features/admin/enterprise_relationships_spec.rb' - 'spec/features/admin/enterprise_roles_spec.rb' @@ -252,9 +261,15 @@ Layout/EmptyLines: - 'spec/support/delayed_job_helper.rb' - 'spec/support/matchers/table_matchers.rb' +# Offense count: 1 +# Cop supports --auto-correct. +Layout/EmptyLinesAroundArguments: + Exclude: + - 'spec/archive/features/consumer/checkout_spec.rb' + # Offense count: 65 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: empty_lines, no_empty_lines Layout/EmptyLinesAroundBlockBody: Exclude: @@ -313,8 +328,8 @@ Layout/EmptyLinesAroundBlockBody: # Offense count: 27 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines +# Configuration parameters: EnforcedStyle. +# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only Layout/EmptyLinesAroundClassBody: Exclude: - 'app/controllers/admin/account_controller.rb' @@ -342,7 +357,19 @@ Layout/EmptyLinesAroundClassBody: - 'lib/open_food_network/rack_request_blocker.rb' - 'lib/open_food_network/reports/bulk_coop_report.rb' -# Offense count: 54 +# Offense count: 5 +# 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/enterprise_serializer.rb' + - 'app/serializers/api/admin/for_order_cycle/supplied_product_serializer.rb' + - 'app/serializers/api/admin/order_cycle_serializer.rb' + +# Offense count: 53 # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. Layout/ExtraSpacing: @@ -362,7 +389,6 @@ Layout/ExtraSpacing: - 'lib/spree/product_filters.rb' - 'lib/tasks/karma.rake' - 'spec/controllers/admin/accounts_and_billing_settings_controller_spec.rb' - - 'spec/factories.rb' - 'spec/features/admin/bulk_order_management_spec.rb' - 'spec/features/admin/bulk_product_update_spec.rb' - 'spec/features/admin/orders_spec.rb' @@ -387,14 +413,14 @@ Layout/ExtraSpacing: # Offense count: 2 # Cop supports --auto-correct. -# Configuration parameters: SupportedStyles, IndentationWidth. +# Configuration parameters: IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_brackets Layout/IndentArray: EnforcedStyle: consistent # Offense count: 52 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_braces Layout/IndentHash: Exclude: @@ -417,7 +443,7 @@ Layout/IndentHash: # Offense count: 20 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: normal, rails Layout/IndentationConsistency: Exclude: @@ -452,7 +478,7 @@ Layout/IndentationWidth: - 'spec/models/enterprise_spec.rb' - 'spec/models/spree/calculator/flexi_rate_spec.rb' -# Offense count: 52 +# Offense count: 51 # Cop supports --auto-correct. Layout/LeadingCommentSpace: Exclude: @@ -470,7 +496,6 @@ Layout/LeadingCommentSpace: - 'lib/tasks/users.rake' - 'spec/archive/features/consumer/checkout_spec.rb' - 'spec/controllers/spree/api/line_items_controller_spec.rb' - - 'spec/factories.rb' - 'spec/features/admin/products_spec.rb' - 'spec/features/admin/reports_spec.rb' - 'spec/jobs/finalize_account_invoices_spec.rb' @@ -508,7 +533,7 @@ Layout/MultilineBlockLayout: # Offense count: 6 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: symmetrical, new_line, same_line Layout/MultilineHashBraceLayout: Exclude: @@ -520,7 +545,7 @@ Layout/MultilineHashBraceLayout: # Offense count: 7 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: symmetrical, new_line, same_line Layout/MultilineMethodCallBraceLayout: Exclude: @@ -533,16 +558,16 @@ Layout/MultilineMethodCallBraceLayout: # Offense count: 4 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: aligned, indented, indented_relative_to_receiver Layout/MultilineMethodCallIndentation: Exclude: - 'spec/lib/open_food_network/cached_products_renderer_spec.rb' - 'spec/serializers/variant_serializer_spec.rb' -# Offense count: 34 +# Offense count: 32 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: aligned, indented Layout/MultilineOperationIndentation: Exclude: @@ -560,7 +585,6 @@ Layout/MultilineOperationIndentation: - 'lib/open_food_network/products_cache_refreshment.rb' - 'lib/open_food_network/sales_tax_report.rb' - 'lib/open_food_network/users_and_enterprises_report.rb' - - 'spec/factories.rb' # Offense count: 7 # Cop supports --auto-correct. @@ -615,7 +639,7 @@ Layout/SpaceAfterSemicolon: # Offense count: 65 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: space, no_space Layout/SpaceAroundEqualsInParameterDefault: Exclude: @@ -659,7 +683,7 @@ Layout/SpaceAroundEqualsInParameterDefault: - 'spec/support/request/distribution_helper.rb' - 'spec/support/request/web_helper.rb' -# Offense count: 61 +# Offense count: 59 # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment. Layout/SpaceAroundOperators: @@ -679,8 +703,6 @@ Layout/SpaceAroundOperators: - 'spec/controllers/admin/enterprises_controller_spec.rb' - 'spec/controllers/cart_controller_spec.rb' - 'spec/controllers/spree/orders_controller_spec.rb' - - 'spec/controllers/user_passwords_controller_spec.rb' - - 'spec/factories.rb' - 'spec/features/admin/bulk_order_management_spec.rb' - 'spec/features/admin/bulk_product_update_spec.rb' - 'spec/features/consumer/shopping/checkout_spec.rb' @@ -703,28 +725,49 @@ Layout/SpaceBeforeComma: - 'spec/features/admin/bulk_order_management_spec.rb' - 'spec/features/admin/bulk_product_update_spec.rb' -# Offense count: 5 +# Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment. Layout/SpaceBeforeFirstArg: Exclude: - - 'spec/factories.rb' - 'spec/features/admin/bulk_product_update_spec.rb' - 'spec/features/consumer/multilingual_spec.rb' - 'spec/models/enterprise_fee_spec.rb' # Offense count: 5 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: require_no_space, require_space Layout/SpaceInLambdaLiteral: Exclude: - 'app/models/spree/product_decorator.rb' - 'app/models/spree/variant_decorator.rb' -# Offense count: 194 +# Offense count: 129 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters. +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. +# SupportedStyles: space, no_space, compact +# SupportedStylesForEmptyBrackets: space, no_space +Layout/SpaceInsideArrayLiteralBrackets: + Exclude: + - 'app/controllers/admin/order_cycles_controller.rb' + - 'app/helpers/spree/reports_helper.rb' + - 'lib/open_food_network/bulk_coop_report.rb' + - 'lib/open_food_network/orders_and_fulfillments_report.rb' + - 'lib/open_food_network/packing_report.rb' + - 'lib/open_food_network/payments_report.rb' + - 'lib/open_food_network/users_and_enterprises_report.rb' + - 'spec/controllers/admin/variant_overrides_controller_spec.rb' + - 'spec/controllers/cart_controller_spec.rb' + - 'spec/features/admin/reports_spec.rb' + - 'spec/jobs/update_billable_periods_spec.rb' + - 'spec/lib/open_food_network/order_and_distributor_report_spec.rb' + - 'spec/lib/open_food_network/order_grouper_spec.rb' + - 'spec/lib/open_food_network/users_and_enterprises_report_spec.rb' + +# Offense count: 192 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. # SupportedStyles: space, no_space # SupportedStylesForEmptyBraces: space, no_space Layout/SpaceInsideBlockBraces: @@ -747,7 +790,6 @@ Layout/SpaceInsideBlockBraces: - 'spec/controllers/spree/admin/base_controller_spec.rb' - 'spec/controllers/spree/admin/orders_controller_spec.rb' - 'spec/controllers/spree/admin/search_controller_spec.rb' - - 'spec/factories.rb' - 'spec/features/admin/bulk_order_management_spec.rb' - 'spec/features/admin/customers_spec.rb' - 'spec/features/admin/tag_rules_spec.rb' @@ -777,31 +819,9 @@ Layout/SpaceInsideBlockBraces: - 'spec/spec_helper.rb' - 'spec/support/cancan_helper.rb' -# Offense count: 134 +# Offense count: 786 # Cop supports --auto-correct. -Layout/SpaceInsideBrackets: - Exclude: - - 'app/controllers/admin/order_cycles_controller.rb' - - 'app/helpers/spree/reports_helper.rb' - - 'app/serializers/api/admin/exchange_serializer.rb' - - 'lib/open_food_network/bulk_coop_report.rb' - - 'lib/open_food_network/order_and_distributor_report.rb' - - 'lib/open_food_network/orders_and_fulfillments_report.rb' - - 'lib/open_food_network/packing_report.rb' - - 'lib/open_food_network/payments_report.rb' - - 'lib/open_food_network/users_and_enterprises_report.rb' - - 'spec/controllers/admin/variant_overrides_controller_spec.rb' - - 'spec/controllers/cart_controller_spec.rb' - - 'spec/features/admin/reports_spec.rb' - - 'spec/jobs/update_billable_periods_spec.rb' - - 'spec/lib/open_food_network/order_and_distributor_report_spec.rb' - - 'spec/lib/open_food_network/order_grouper_spec.rb' - - 'spec/lib/open_food_network/users_and_enterprises_report_spec.rb' - - 'spec/performance/orders_controller_spec.rb' - -# Offense count: 784 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces. +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. # SupportedStyles: space, no_space, compact # SupportedStylesForEmptyBraces: space, no_space Layout/SpaceInsideHashLiteralBraces: @@ -871,7 +891,6 @@ Layout/SpaceInsideHashLiteralBraces: - 'spec/controllers/spree/user_sessions_controller_spec.rb' - 'spec/controllers/user_passwords_controller_spec.rb' - 'spec/controllers/user_registrations_controller_spec.rb' - - 'spec/factories.rb' - 'spec/features/admin/accounts_and_billing_settings_spec.rb' - 'spec/features/admin/image_settings_spec.rb' - 'spec/features/admin/products_spec.rb' @@ -919,9 +938,19 @@ Layout/SpaceInsideHashLiteralBraces: - 'spec/support/request/shop_workflow.rb' - 'spec/support/seeds.rb' +# Offense count: 4 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. +# SupportedStyles: space, no_space +# SupportedStylesForEmptyBrackets: space, no_space +Layout/SpaceInsideReferenceBrackets: + Exclude: + - 'app/serializers/api/admin/exchange_serializer.rb' + - 'spec/performance/orders_controller_spec.rb' + # Offense count: 10 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: space, no_space Layout/SpaceInsideStringInterpolation: Exclude: @@ -931,6 +960,7 @@ Layout/SpaceInsideStringInterpolation: # Offense count: 5 # Cop supports --auto-correct. +# Configuration parameters: IndentationWidth. Layout/Tab: Exclude: - 'app/controllers/admin/invoice_settings_controller.rb' @@ -940,6 +970,7 @@ Layout/Tab: # Offense count: 62 # Cop supports --auto-correct. +# Configuration parameters: AllowInHeredoc. Layout/TrailingWhitespace: Exclude: - 'app/models/distributor_shipping_method.rb' @@ -968,34 +999,17 @@ Layout/TrailingWhitespace: - 'spec/support/request/menu_helper.rb' - 'spec/views/json/producers.json.rabl_spec.rb' -# Offense count: 5 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleAlignWith, SupportedStylesAlignWith. -# SupportedStylesAlignWith: either, start_of_block, start_of_line -Lint/BlockAlignment: - Exclude: - - 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb' - - 'spec/models/enterprise_spec.rb' - - 'spec/models/spree/line_item_spec.rb' - - 'spec/models/spree/product_spec.rb' - # Offense count: 1 # Cop supports --auto-correct. Lint/DeprecatedClassMethods: Exclude: - 'app/controllers/admin/product_import_controller.rb' -# Offense count: 5 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleAlignWith, SupportedStylesAlignWith, AutoCorrect. -# SupportedStylesAlignWith: keyword, variable, start_of_line -Lint/EndAlignment: +# Offense count: 4 +Lint/DuplicateMethods: Exclude: - - 'app/controllers/admin/order_cycles_controller.rb' - - 'app/controllers/api/order_cycles_controller.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/order_cycle_serializer.rb' + - 'lib/discourse/single_sign_on.rb' + - 'lib/open_food_network/subscription_summary.rb' # Offense count: 18 Lint/IneffectiveAccessModifier: @@ -1010,7 +1024,7 @@ Lint/IneffectiveAccessModifier: # Offense count: 2 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: runtime_error, standard_error Lint/InheritException: Exclude: @@ -1018,7 +1032,7 @@ Lint/InheritException: - 'lib/open_food_network/products_renderer.rb' # Offense count: 1 -Lint/LiteralInCondition: +Lint/LiteralAsCondition: Exclude: - 'lib/open_food_network/rack_request_blocker.rb' @@ -1028,6 +1042,7 @@ Lint/NonLocalExitFromIterator: - 'app/models/product_importer.rb' # Offense count: 1 +# Cop supports --auto-correct. Lint/ScriptPermission: Exclude: - 'Rakefile' @@ -1055,7 +1070,7 @@ Lint/UnderscorePrefixedVariableName: Exclude: - 'spec/support/cancan_helper.rb' -# Offense count: 128 +# Offense count: 125 # Cop supports --auto-correct. # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. Lint/UnusedBlockArgument: @@ -1081,7 +1096,6 @@ Lint/UnusedBlockArgument: - 'lib/open_food_network/reports/bulk_coop_supplier_report.rb' - 'lib/open_food_network/sales_tax_report.rb' - 'lib/open_food_network/xero_invoices_report.rb' - - 'spec/factories.rb' - 'spec/lib/open_food_network/order_grouper_spec.rb' - 'spec/support/cancan_helper.rb' - 'spec/support/delayed_job_helper.rb' @@ -1120,7 +1134,8 @@ Lint/UselessAccessModifier: - 'lib/open_food_network/reports/bulk_coop_report.rb' - 'spec/lib/open_food_network/reports/report_spec.rb' -# Offense count: 313 +# Offense count: 315 +# Configuration parameters: CheckForMethodsWithNoSideEffects. Lint/Void: Exclude: - 'app/serializers/api/enterprise_serializer.rb' @@ -1136,7 +1151,6 @@ Lint/Void: - 'spec/controllers/spree/api/products_controller_spec.rb' - 'spec/controllers/spree/api/variants_controller_spec.rb' - 'spec/controllers/spree/orders_controller_spec.rb' - - 'spec/controllers/user_passwords_controller_spec.rb' - 'spec/controllers/user_registrations_controller_spec.rb' - 'spec/features/admin/bulk_product_update_spec.rb' - 'spec/features/admin/enterprise_fees_spec.rb' @@ -1183,11 +1197,109 @@ Lint/Void: - 'spec/serializers/enterprise_serializer_spec.rb' - 'spec/support/request/web_helper.rb' -# Offense count: 950 +# Offense count: 945 # Configuration parameters: CountComments, ExcludedMethods. Metrics/BlockLength: Max: 773 +# Offense count: 8 +Naming/AccessorMethodName: + Exclude: + - 'app/models/product_importer.rb' + - '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: 2 +# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms. +# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS +Naming/FileName: + Exclude: + - 'Gemfile' + - 'Guardfile' + +# 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: 25 +# 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/product_importer.rb' + - 'app/models/spreadsheet_entry.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: 14 +# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. +# AllowedNames: io, id, to, by, on, in, at +Naming/UncommunicativeMethodParamName: + Exclude: + - 'app/controllers/spree/orders_controller_decorator.rb' + - '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/property_merge.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: 4 +# Configuration parameters: EnforcedStyle. +# SupportedStyles: snake_case, camelCase +Naming/VariableName: + Exclude: + - 'app/controllers/spree/admin/reports_controller_decorator.rb' + - 'app/helpers/admin/injection_helper.rb' + +# Offense count: 16 +# Configuration parameters: EnforcedStyle. +# SupportedStyles: snake_case, normalcase, non_integer +Naming/VariableNumber: + Exclude: + - 'spec/archive/features/consumer/checkout_spec.rb' + - 'spec/lib/open_food_network/products_and_inventory_report_spec.rb' + - 'spec/models/calculator/weight_spec.rb' + # Offense count: 1 Performance/Caller: Exclude: @@ -1237,6 +1349,80 @@ Performance/StringReplacement: - 'app/helpers/spree/admin/navigation_helper_decorator.rb' - 'app/models/spree/preferences/file_configuration.rb' +# Offense count: 4 +# Cop supports --auto-correct. +Performance/UnneededSort: + Exclude: + - 'spec/features/admin/order_cycles_spec.rb' + +# Offense count: 203 +# Cop supports --auto-correct. +Rails/ActiveRecordAliases: + Exclude: + - 'app/controllers/admin/bulk_line_items_controller.rb' + - 'app/controllers/admin/enterprises_controller.rb' + - 'app/controllers/admin/order_cycles_controller.rb' + - 'app/controllers/admin/subscriptions_controller.rb' + - 'app/controllers/api/enterprises_controller.rb' + - 'app/controllers/api/product_images_controller.rb' + - 'app/controllers/checkout_controller.rb' + - 'app/controllers/spree/admin/line_items_controller_decorator.rb' + - 'app/controllers/spree/orders_controller_decorator.rb' + - 'app/helpers/i18n_helper.rb' + - 'app/jobs/subscription_placement_job.rb' + - 'app/jobs/update_account_invoices.rb' + - 'app/jobs/update_billable_periods.rb' + - 'app/models/billable_period.rb' + - 'app/models/spree/adjustment_decorator.rb' + - 'app/models/spree/line_item_decorator.rb' + - 'app/models/spree/order_decorator.rb' + - 'app/models/spree/product_set.rb' + - 'app/services/create_mail_method.rb' + - 'app/services/line_item_syncer.rb' + - 'app/services/order_factory.rb' + - 'app/services/order_syncer.rb' + - 'lib/open_food_network/order_cycle_form_applicator.rb' + - 'lib/open_food_network/subscription_payment_updater.rb' + - 'lib/stripe/profile_storer.rb' + - 'spec/controllers/admin/customers_controller_spec.rb' + - 'spec/controllers/admin/proxy_orders_controller_spec.rb' + - 'spec/controllers/admin/subscriptions_controller_spec.rb' + - 'spec/controllers/line_items_controller_spec.rb' + - 'spec/controllers/spree/admin/payment_methods_controller_spec.rb' + - 'spec/controllers/spree/orders_controller_spec.rb' + - 'spec/features/admin/bulk_order_management_spec.rb' + - 'spec/features/admin/order_cycles_spec.rb' + - 'spec/features/admin/orders_spec.rb' + - 'spec/features/admin/subscriptions_spec.rb' + - 'spec/features/admin/variants_spec.rb' + - 'spec/features/consumer/account_spec.rb' + - 'spec/features/consumer/registration_spec.rb' + - 'spec/features/consumer/shopping/cart_spec.rb' + - 'spec/features/consumer/shopping/orders_spec.rb' + - 'spec/features/consumer/shopping/shopping_spec.rb' + - 'spec/jobs/subscription_confirm_job_spec.rb' + - 'spec/jobs/subscription_placement_job_spec.rb' + - 'spec/jobs/update_account_invoices_spec.rb' + - 'spec/jobs/update_billable_periods_spec.rb' + - 'spec/lib/open_food_network/products_cache_refreshment_spec.rb' + - 'spec/lib/open_food_network/products_cache_spec.rb' + - 'spec/models/customer_spec.rb' + - 'spec/models/enterprise_caching_spec.rb' + - 'spec/models/exchange_spec.rb' + - 'spec/models/order_cycle_spec.rb' + - 'spec/models/producer_property_spec.rb' + - 'spec/models/proxy_order_spec.rb' + - 'spec/models/spree/adjustment_spec.rb' + - 'spec/models/spree/line_item_spec.rb' + - 'spec/models/spree/order_spec.rb' + - 'spec/models/spree/product_spec.rb' + - 'spec/models/spree/user_spec.rb' + - 'spec/models/spree/variant_spec.rb' + - 'spec/models/variant_override_spec.rb' + - 'spec/requests/checkout/stripe_connect_spec.rb' + - 'spec/services/order_syncer_spec.rb' + - 'spec/services/subscription_estimator_spec.rb' + # Offense count: 11 # Cop supports --auto-correct. # Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent. @@ -1251,7 +1437,7 @@ Rails/Blank: - 'lib/tasks/data.rake' # Offense count: 3 -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: strict, flexible Rails/Date: Exclude: @@ -1260,6 +1446,7 @@ Rails/Date: # Offense count: 6 # Cop supports --auto-correct. +# Configuration parameters: EnforceForPrefixed. Rails/Delegate: Exclude: - 'app/models/spree/line_item_decorator.rb' @@ -1300,6 +1487,56 @@ Rails/HasAndBelongsToMany: - 'app/models/spree/line_item_decorator.rb' - 'app/models/spree/payment_method_decorator.rb' +# Offense count: 31 +# Configuration parameters: Include. +# Include: app/models/**/*.rb +Rails/HasManyOrHasOneDependent: + Exclude: + - 'app/models/account_invoice.rb' + - 'app/models/billable_period.rb' + - 'app/models/cart.rb' + - 'app/models/customer.rb' + - 'app/models/enterprise.rb' + - 'app/models/order_cycle.rb' + - 'app/models/spree/address_decorator.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: 43 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: numeric, symbolic +Rails/HttpStatus: + Exclude: + - 'app/controllers/admin/bulk_line_items_controller.rb' + - 'app/controllers/admin/column_preferences_controller.rb' + - 'app/controllers/admin/customers_controller.rb' + - 'app/controllers/admin/enterprise_fees_controller.rb' + - 'app/controllers/admin/enterprise_relationships_controller.rb' + - 'app/controllers/admin/enterprise_roles_controller.rb' + - 'app/controllers/admin/manager_invitations_controller.rb' + - 'app/controllers/admin/tag_rules_controller.rb' + - 'app/controllers/admin/variant_overrides_controller.rb' + - 'app/controllers/api/enterprises_controller.rb' + - 'app/controllers/application_controller.rb' + - 'app/controllers/checkout_controller.rb' + - 'app/controllers/enterprises_controller.rb' + - 'app/controllers/line_items_controller.rb' + - 'app/controllers/shop_controller.rb' + - 'app/controllers/spree/admin/line_items_controller_decorator.rb' + - 'app/controllers/spree/admin/products_controller_decorator.rb' + - 'app/controllers/spree/credit_cards_controller.rb' + - 'app/controllers/spree/orders_controller_decorator.rb' + - 'app/controllers/spree/store_controller_decorator.rb' + - 'app/controllers/stripe/callbacks_controller.rb' + - 'app/controllers/stripe/webhooks_controller.rb' + # Offense count: 11 Rails/OutputSafety: Exclude: @@ -1310,7 +1547,7 @@ Rails/OutputSafety: - 'lib/spree/money_decorator.rb' - 'spec/features/admin/orders_spec.rb' -# Offense count: 6 +# Offense count: 7 # Cop supports --auto-correct. Rails/PluralizationGrammar: Exclude: @@ -1319,6 +1556,12 @@ Rails/PluralizationGrammar: - 'spec/jobs/update_billable_periods_spec.rb' - 'spec/models/order_cycle_spec.rb' +# Offense count: 1 +# Cop supports --auto-correct. +Rails/Presence: + Exclude: + - 'app/serializers/api/admin/customer_serializer.rb' + # Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: NotNilAndNotEmpty, NotBlank, UnlessBlank. @@ -1357,7 +1600,7 @@ Rails/ScopeArgs: - 'app/models/spree/variant_decorator.rb' # Offense count: 18 -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: strict, flexible Rails/TimeZone: Exclude: @@ -1374,6 +1617,13 @@ Rails/TimeZone: - 'spec/models/enterprise_relationship_spec.rb' - 'spec/models/variant_override_spec.rb' +# Offense count: 1 +# Configuration parameters: Environments. +# Environments: development, test, production +Rails/UnknownEnv: + Exclude: + - 'lib/open_food_network/cached_products_renderer.rb' + # Offense count: 21 # Cop supports --auto-correct. # Configuration parameters: Include. @@ -1391,18 +1641,9 @@ Rails/Validation: - 'app/models/spree/variant_decorator.rb' - 'app/models/variant_override.rb' -# Offense count: 8 -Style/AccessorMethodName: - Exclude: - - 'app/models/product_importer.rb' - - '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: 35 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: always, conditionals Style/AndOr: Exclude: @@ -1423,16 +1664,16 @@ Style/AndOr: # Offense count: 2 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: percent_q, bare_percent Style/BarePercentLiterals: Exclude: - 'spec/features/admin/variants_spec.rb' - 'spec/support/request/web_helper.rb' -# Offense count: 209 +# Offense count: 210 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: braces, no_braces, context_dependent Style/BracesAroundHashParameters: Exclude: @@ -1480,7 +1721,6 @@ Style/BracesAroundHashParameters: - 'spec/controllers/spree/api/variants_controller_spec.rb' - 'spec/controllers/spree/orders_controller_spec.rb' - 'spec/controllers/user_confirmations_controller_spec.rb' - - 'spec/factories.rb' - 'spec/features/admin/accounts_and_billing_settings_spec.rb' - 'spec/features/admin/business_model_configuration_spec.rb' - 'spec/features/admin/order_cycles_spec.rb' @@ -1514,7 +1754,8 @@ Style/CaseEquality: - 'spec/models/spree/payment_spec.rb' # Offense count: 87 -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Cop supports --auto-correct. +# Configuration parameters: AutoCorrect, EnforcedStyle. # SupportedStyles: nested, compact Style/ClassAndModuleChildren: Exclude: @@ -1601,7 +1842,7 @@ Style/ClassAndModuleChildren: # Offense count: 3 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: is_a?, kind_of? Style/ClassCheck: Exclude: @@ -1624,7 +1865,7 @@ Style/ColonMethodCall: # Offense count: 12 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions. +# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions. # SupportedStyles: assign_to_condition, assign_inside_condition Style/ConditionalAssignment: Exclude: @@ -1639,6 +1880,11 @@ Style/ConditionalAssignment: - 'app/models/spree/payment_decorator.rb' - 'spec/lib/open_food_network/order_grouper_spec.rb' +# Offense count: 2 +Style/DateTime: + Exclude: + - 'lib/open_food_network/users_and_enterprises_report.rb' + # Offense count: 5 # Cop supports --auto-correct. Style/EachWithObject: @@ -1650,7 +1896,7 @@ Style/EachWithObject: # Offense count: 1 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: empty, nil, both Style/EmptyElse: Exclude: @@ -1665,7 +1911,7 @@ Style/EmptyLiteral: # Offense count: 6 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: compact, expanded Style/EmptyMethod: Exclude: @@ -1677,18 +1923,20 @@ Style/EmptyMethod: - 'app/controllers/spree/admin/products_controller_decorator.rb' # Offense count: 2 -# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms. -# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS -Style/FileName: +# Cop supports --auto-correct. +Style/ExpandPathArguments: Exclude: - - 'Gemfile' - - 'Guardfile' + - 'spec/features/admin/products_spec.rb' + - 'spec/performance/shop_controller_spec.rb' -# Offense count: 1 -# Configuration parameters: SupportedStyles. -# SupportedStyles: annotated, template +# Offense count: 5 +# Configuration parameters: EnforcedStyle. +# SupportedStyles: annotated, template, unannotated Style/FormatStringToken: - EnforcedStyle: template + Exclude: + - 'app/helpers/order_cycles_helper.rb' + - 'lib/open_food_network/sales_tax_report.rb' + - 'spec/models/enterprise_spec.rb' # Offense count: 88 # Configuration parameters: MinBodyLength. @@ -1741,9 +1989,9 @@ Style/GuardClause: - 'spec/support/request/distribution_helper.rb' - 'spec/support/request/shop_workflow.rb' -# Offense count: 1109 +# Offense count: 1040 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. +# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys Style/HashSyntax: Exclude: @@ -1856,7 +2104,6 @@ Style/HashSyntax: - 'spec/controllers/spree/orders_controller_spec.rb' - 'spec/controllers/spree/user_sessions_controller_spec.rb' - 'spec/controllers/user_registrations_controller_spec.rb' - - 'spec/factories.rb' - 'spec/features/admin/bulk_order_management_spec.rb' - 'spec/features/admin/bulk_product_update_spec.rb' - 'spec/features/admin/customers_spec.rb' @@ -1935,6 +2182,7 @@ Style/LineEndConcatenation: # Offense count: 11 # Cop supports --auto-correct. +# Configuration parameters: IgnoredMethods. Style/MethodCallWithoutArgsParentheses: Exclude: - 'app/controllers/spree/admin/payment_methods_controller_decorator.rb' @@ -1947,7 +2195,7 @@ Style/MethodCallWithoutArgsParentheses: # Offense count: 14 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline Style/MethodDefParentheses: Exclude: @@ -1968,6 +2216,16 @@ Style/MethodMissing: Exclude: - 'app/helpers/application_helper.rb' +# Offense count: 6 +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/orders_and_fulfillments_report_spec.rb' + - 'spec/lib/open_food_network/packing_report_spec.rb' + # Offense count: 4 # Cop supports --auto-correct. Style/MultilineIfModifier: @@ -1985,6 +2243,8 @@ Style/MutableConstant: # Offense count: 7 # Cop supports --auto-correct. +# Configuration parameters: Whitelist. +# Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with Style/NestedParenthesizedCalls: Exclude: - 'app/controllers/admin/enterprises_controller.rb' @@ -2002,7 +2262,7 @@ Style/NestedTernaryOperator: # Offense count: 3 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles. +# Configuration parameters: EnforcedStyle, MinBodyLength. # SupportedStyles: skip_modifier_ifs, always Style/Next: Exclude: @@ -2029,13 +2289,13 @@ Style/Not: # Offense count: 16 # Cop supports --auto-correct. -# Configuration parameters: EnforcedOctalStyle, SupportedOctalStyles. +# Configuration parameters: EnforcedOctalStyle. # SupportedOctalStyles: zero_with_o, zero_only Style/NumericLiteralPrefix: Exclude: - 'spec/features/admin/order_cycles_spec.rb' -# Offense count: 15 +# Offense count: 12 # Cop supports --auto-correct. # Configuration parameters: Strict. Style/NumericLiterals: @@ -2043,7 +2303,7 @@ Style/NumericLiterals: # Offense count: 14 # Cop supports --auto-correct. -# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles. +# Configuration parameters: AutoCorrect, EnforcedStyle. # SupportedStyles: predicate, comparison Style/NumericPredicate: Exclude: @@ -2065,11 +2325,6 @@ Style/OneLineConditional: Exclude: - 'app/controllers/spree/admin/orders_controller_decorator.rb' -# Offense count: 1 -Style/OpMethod: - Exclude: - - 'app/models/exchange.rb' - # Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: AllowSafeAssignment. @@ -2077,37 +2332,9 @@ Style/ParenthesesAroundCondition: Exclude: - 'app/controllers/checkout_controller.rb' -# Offense count: 25 -# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist. -# NamePrefix: is_, has_, have_ -# NamePrefixBlacklist: is_, has_, have_ -# NameWhitelist: is_a? -Style/PredicateName: - Exclude: - - 'spec/**/*' - - 'app/mailers/producer_mailer.rb' - - 'app/models/enterprise.rb' - - 'app/models/enterprise_relationship.rb' - - 'app/models/order_cycle.rb' - - 'app/models/product_importer.rb' - - 'app/models/spreadsheet_entry.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: 4 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: short, verbose Style/PreferredHashMethods: Exclude: @@ -2126,7 +2353,7 @@ Style/Proc: # Offense count: 5 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: compact, exploded Style/RaiseArgs: Exclude: @@ -2158,7 +2385,7 @@ Style/RedundantParentheses: - 'spec/controllers/admin/enterprises_controller_spec.rb' - 'spec/features/admin/bulk_product_update_spec.rb' -# Offense count: 12 +# Offense count: 13 # Cop supports --auto-correct. # Configuration parameters: AllowMultipleReturnValues. Style/RedundantReturn: @@ -2166,6 +2393,7 @@ Style/RedundantReturn: - 'app/controllers/admin/enterprise_fees_controller.rb' - 'app/controllers/admin/enterprises_controller.rb' - 'app/controllers/admin/product_import_controller.rb' + - 'app/controllers/spree/credit_cards_controller.rb' - 'app/models/enterprise_fee.rb' - 'app/models/spree/adjustment_decorator.rb' - 'app/models/spree/classification_decorator.rb' @@ -2209,7 +2437,7 @@ Style/RedundantSelf: # Offense count: 13 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes. +# Configuration parameters: EnforcedStyle, AllowInnerSlashes. # SupportedStyles: slashes, percent_r, mixed Style/RegexpLiteral: Exclude: @@ -2234,7 +2462,7 @@ Style/RescueModifier: # Offense count: 5 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: require_parentheses, require_no_parentheses Style/StabbyLambdaParentheses: Exclude: @@ -2243,7 +2471,7 @@ Style/StabbyLambdaParentheses: # Offense count: 14 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle. # SupportedStyles: single_quotes, double_quotes Style/StringLiteralsInInterpolation: Exclude: @@ -2293,7 +2521,7 @@ Style/SymbolProc: # Offense count: 5 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, AllowSafeAssignment. +# Configuration parameters: EnforcedStyle, AllowSafeAssignment. # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex Style/TernaryParentheses: Exclude: @@ -2370,19 +2598,8 @@ Style/UnneededPercentQ: - 'spec/features/consumer/producers_spec.rb' - 'spec/support/request/web_helper.rb' -# Offense count: 4 -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: snake_case, camelCase -Style/VariableName: - Exclude: - - 'app/controllers/spree/admin/reports_controller_decorator.rb' - - 'app/helpers/admin/injection_helper.rb' - -# Offense count: 16 -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: snake_case, normalcase, non_integer -Style/VariableNumber: - Exclude: - - 'spec/archive/features/consumer/checkout_spec.rb' - - 'spec/lib/open_food_network/products_and_inventory_report_spec.rb' - - 'spec/models/calculator/weight_spec.rb' +# Offense count: 6392 +# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. +# URISchemes: http, https +Metrics/LineLength: + Max: 623 diff --git a/Gemfile.lock b/Gemfile.lock index d12583b8f4..442d477f35 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -184,7 +184,7 @@ GEM angularjs-file-upload-rails (1.1.6) angularjs-rails (1.5.5) arel (3.0.3) - ast (2.3.0) + ast (2.4.0) atomic (1.1.99) awesome_nested_set (2.1.5) activerecord (>= 3.0.0) @@ -512,8 +512,8 @@ GEM parallel (1.11.2) parallel_tests (2.14.1) parallel - parser (2.4.0.0) - ast (~> 2.2) + parser (2.5.1.0) + ast (~> 2.4.0) paypal-sdk-core (0.2.10) multi_json (~> 1.0) xml-simple @@ -565,8 +565,7 @@ GEM rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) - rainbow (2.2.2) - rake + rainbow (3.0.0) raindrops (0.13.0) rake (10.5.0) ransack (0.7.2) @@ -620,11 +619,11 @@ GEM rspec-retry (0.5.6) rspec-core (> 3.3, < 3.8) rspec-support (3.7.0) - rubocop (0.49.1) + rubocop (0.55.0) parallel (~> 1.10) - parser (>= 2.3.3.1, < 3.0) + parser (>= 2.5) powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) + rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.8.1) @@ -670,7 +669,7 @@ GEM uglifier (2.7.1) execjs (>= 0.3.0) json (>= 1.8.0) - unicode-display_width (1.3.0) + unicode-display_width (1.3.2) unicorn (4.9.0) kgio (~> 2.6) rack