diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index bff6260c..e449d97d 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,74 +1,74 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2022-02-05 12:00:00 UTC using RuboCop version 1.25.1. +# on 2022-10-08 12:00:00 UTC using RuboCop version 1.36.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: 28 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include. # Include: **/*.gemfile, **/Gemfile, **/gems.rb Bundler/OrderedGems: Exclude: - - 'Gemfile' + - "Gemfile" # Offense count: 9 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Include. # Include: **/*.gemspec Gemspec/RequireMFA: Exclude: - - 'plugins/current_orders/foodsoft_current_orders.gemspec' - - 'plugins/discourse/foodsoft_discourse.gemspec' - - 'plugins/documents/foodsoft_documents.gemspec' - - 'plugins/links/foodsoft_links.gemspec' - - 'plugins/messages/foodsoft_messages.gemspec' - - 'plugins/polls/foodsoft_polls.gemspec' - - 'plugins/printer/foodsoft_printer.gemspec' - - 'plugins/uservoice/foodsoft_uservoice.gemspec' - - 'plugins/wiki/foodsoft_wiki.gemspec' + - "plugins/current_orders/foodsoft_current_orders.gemspec" + - "plugins/discourse/foodsoft_discourse.gemspec" + - "plugins/documents/foodsoft_documents.gemspec" + - "plugins/links/foodsoft_links.gemspec" + - "plugins/messages/foodsoft_messages.gemspec" + - "plugins/polls/foodsoft_polls.gemspec" + - "plugins/printer/foodsoft_printer.gemspec" + - "plugins/uservoice/foodsoft_uservoice.gemspec" + - "plugins/wiki/foodsoft_wiki.gemspec" # Offense count: 9 # Configuration parameters: Include. # Include: **/*.gemspec Gemspec/RequiredRubyVersion: Exclude: - - 'plugins/current_orders/foodsoft_current_orders.gemspec' - - 'plugins/discourse/foodsoft_discourse.gemspec' - - 'plugins/documents/foodsoft_documents.gemspec' - - 'plugins/links/foodsoft_links.gemspec' - - 'plugins/messages/foodsoft_messages.gemspec' - - 'plugins/polls/foodsoft_polls.gemspec' - - 'plugins/printer/foodsoft_printer.gemspec' - - 'plugins/uservoice/foodsoft_uservoice.gemspec' - - 'plugins/wiki/foodsoft_wiki.gemspec' + - "plugins/current_orders/foodsoft_current_orders.gemspec" + - "plugins/discourse/foodsoft_discourse.gemspec" + - "plugins/documents/foodsoft_documents.gemspec" + - "plugins/links/foodsoft_links.gemspec" + - "plugins/messages/foodsoft_messages.gemspec" + - "plugins/polls/foodsoft_polls.gemspec" + - "plugins/printer/foodsoft_printer.gemspec" + - "plugins/uservoice/foodsoft_uservoice.gemspec" + - "plugins/wiki/foodsoft_wiki.gemspec" # Offense count: 8 -# Configuration parameters: IgnoredMethods. +# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods. Lint/AmbiguousBlockAssociation: Exclude: - - 'lib/foodsoft/expansion_variables.rb' - - 'spec/api/v1/user/financial_transactions_spec.rb' - - 'spec/api/v1/user/group_order_articles_spec.rb' - - 'spec/models/article_spec.rb' + - "lib/foodsoft/expansion_variables.rb" + - "spec/api/v1/user/financial_transactions_spec.rb" + - "spec/api/v1/user/group_order_articles_spec.rb" + - "spec/models/article_spec.rb" # Offense count: 4 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Lint/AmbiguousOperatorPrecedence: Exclude: - - 'app/models/concerns/price_calculation.rb' - - 'db/seeds/seed_helper.rb' - - 'plugins/messages/app/mail_receivers/messages_mail_receiver.rb' - - 'plugins/wiki/app/helpers/pages_helper.rb' + - "app/models/concerns/price_calculation.rb" + - "db/seeds/seed_helper.rb" + - "plugins/messages/app/mail_receivers/messages_mail_receiver.rb" + - "plugins/wiki/app/helpers/pages_helper.rb" # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Lint/AmbiguousRegexpLiteral: Exclude: - - 'app/models/article_category.rb' - - 'lib/foodsoft/expansion_variables.rb' + - "app/models/article_category.rb" + - "lib/foodsoft/expansion_variables.rb" # Offense count: 40 # Configuration parameters: AllowSafeAssignment. @@ -76,198 +76,197 @@ Lint/AssignmentInCondition: Enabled: false # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Lint/BigDecimalNew: Exclude: - - 'app/models/group_order.rb' - - 'config/initializers/extensions.rb' + - "app/models/group_order.rb" + - "config/initializers/extensions.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). Lint/BooleanSymbol: Exclude: - - 'app/models/delivery.rb' + - "app/models/delivery.rb" # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Lint/DeprecatedClassMethods: Exclude: - - 'config/initializers/secret_token.rb' - - 'lib/tasks/foodsoft_setup.rake' + - "config/initializers/secret_token.rb" + - "lib/tasks/foodsoft_setup.rake" # Offense count: 3 # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches. Lint/DuplicateBranch: Exclude: - - 'app/controllers/concerns/auth_api.rb' - - 'app/controllers/orders_controller.rb' + - "app/controllers/concerns/auth_api.rb" + - "app/controllers/orders_controller.rb" # Offense count: 3 Lint/DuplicateMethods: Exclude: - - 'app/models/invoice.rb' - - 'plugins/messages/app/models/message.rb' + - "app/models/invoice.rb" + - "plugins/messages/app/models/message.rb" # Offense count: 2 # Configuration parameters: AllowComments, AllowEmptyLambdas. Lint/EmptyBlock: Exclude: - - 'spec/factories/group_order_article.rb' - - 'spec/factories/group_order_article_quantity.rb' + - "spec/factories/group_order_article.rb" + - "spec/factories/group_order_article_quantity.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Lint/EnsureReturn: Exclude: - - 'app/controllers/finance/bank_accounts_controller.rb' + - "app/controllers/finance/bank_accounts_controller.rb" # Offense count: 2 Lint/IneffectiveAccessModifier: Exclude: - - 'lib/foodsoft_mail_receiver.rb' - - 'lib/token_verifier.rb' + - "lib/foodsoft_mail_receiver.rb" + - "lib/token_verifier.rb" # Offense count: 1 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). Lint/Loop: Exclude: - - 'app/models/concerns/mark_as_deleted_with_name.rb' + - "app/models/concerns/mark_as_deleted_with_name.rb" # Offense count: 2 Lint/MixedRegexpCaptureTypes: Exclude: - - 'lib/bank_transaction_reference.rb' - - 'lib/foodsoft_mail_receiver.rb' + - "lib/bank_transaction_reference.rb" + - "lib/foodsoft_mail_receiver.rb" # Offense count: 1 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). Lint/NonDeterministicRequireOrder: Exclude: - - 'spec/spec_helper.rb' + - "spec/spec_helper.rb" # Offense count: 1 Lint/ReturnInVoidContext: Exclude: - - 'lib/foodsoft_config.rb' + - "lib/foodsoft_config.rb" -# Offense count: 7 -# Cop supports --auto-correct. +# Offense count: 4 +# This cop supports safe autocorrection (--autocorrect). Lint/SendWithMixinArgument: Exclude: - - 'config/initializers/doorkeeper.rb' - - 'plugins/discourse/lib/foodsoft_discourse/redirect_to_login.rb' - - 'plugins/messages/lib/foodsoft_messages/user_link.rb' - - 'plugins/uservoice/lib/foodsoft_uservoice.rb' - - 'plugins/wiki/lib/foodsoft_wiki/mailer.rb' + - "plugins/discourse/lib/foodsoft_discourse/redirect_to_login.rb" + - "plugins/messages/lib/foodsoft_messages/user_link.rb" + - "plugins/uservoice/lib/foodsoft_uservoice.rb" + - "plugins/wiki/lib/foodsoft_wiki/mailer.rb" # Offense count: 1 # Configuration parameters: IgnoreImplicitReferences. Lint/ShadowedArgument: Exclude: - - 'app/helpers/deliveries_helper.rb' + - "app/helpers/deliveries_helper.rb" # Offense count: 8 Lint/ShadowingOuterLocalVariable: Exclude: - - 'app/documents/order_matrix.rb' - - 'app/helpers/group_orders_helper.rb' - - 'app/models/group_order.rb' - - 'app/models/group_order_article.rb' - - 'plugins/discourse/app/controllers/discourse_login_controller.rb' - - 'plugins/polls/app/controllers/polls_controller.rb' - - 'spec/integration/config_spec.rb' + - "app/documents/order_matrix.rb" + - "app/helpers/group_orders_helper.rb" + - "app/models/group_order.rb" + - "app/models/group_order_article.rb" + - "plugins/discourse/app/controllers/discourse_login_controller.rb" + - "plugins/polls/app/controllers/polls_controller.rb" + - "spec/integration/config_spec.rb" -# Offense count: 2 +# Offense count: 3 # Configuration parameters: AllowComments, AllowNil. Lint/SuppressedException: Exclude: - - 'config/initializers/rails6_backports.rb' - - 'lib/foodsoft_config.rb' - - 'lib/tasks/rspec.rake' + - "config/initializers/rails6_backports.rb" + - "lib/foodsoft_config.rb" + - "lib/tasks/rspec.rake" # Offense count: 1 # Configuration parameters: AllowKeywordBlockArguments. Lint/UnderscorePrefixedVariableName: Exclude: - - 'app/models/order_article.rb' + - "app/models/order_article.rb" # Offense count: 16 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. Lint/UnusedBlockArgument: Exclude: - - 'app/models/article.rb' - - 'app/models/group_order.rb' - - 'config/initializers/exception_notification.rb' - - 'plugins/printer/lib/foodsoft_printer/engine.rb' - - 'plugins/uservoice/lib/foodsoft_uservoice.rb' - - 'plugins/wiki/lib/foodsoft_wiki/wiki_parser.rb' - - 'spec/factories/supplier.rb' - - 'spec/factories/user.rb' - - 'spec/integration/config_spec.rb' - - 'spec/models/article_spec.rb' + - "app/models/article.rb" + - "app/models/group_order.rb" + - "config/initializers/exception_notification.rb" + - "plugins/printer/lib/foodsoft_printer/engine.rb" + - "plugins/uservoice/lib/foodsoft_uservoice.rb" + - "plugins/wiki/lib/foodsoft_wiki/wiki_parser.rb" + - "spec/factories/supplier.rb" + - "spec/factories/user.rb" + - "spec/integration/config_spec.rb" + - "spec/models/article_spec.rb" # Offense count: 23 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods. Lint/UnusedMethodArgument: Exclude: - - 'app/controllers/api/v1/base_controller.rb' - - 'app/controllers/concerns/foodcoop_scope.rb' - - 'app/helpers/application_helper.rb' - - 'app/models/article.rb' - - 'app/models/article_category.rb' - - 'app/models/financial_transaction.rb' - - 'app/models/group_order.rb' - - 'app/models/group_order_article.rb' - - 'app/models/order.rb' - - 'app/models/order_article.rb' - - 'app/models/supplier.rb' - - 'lib/foodsoft_mail_receiver.rb' - - 'lib/order_txt.rb' - - 'lib/render_pdf.rb' - - 'plugins/wiki/lib/foodsoft_wiki/mailer.rb' + - "app/controllers/api/v1/base_controller.rb" + - "app/controllers/concerns/foodcoop_scope.rb" + - "app/helpers/application_helper.rb" + - "app/models/article.rb" + - "app/models/article_category.rb" + - "app/models/financial_transaction.rb" + - "app/models/group_order.rb" + - "app/models/group_order_article.rb" + - "app/models/order.rb" + - "app/models/order_article.rb" + - "app/models/supplier.rb" + - "lib/foodsoft_mail_receiver.rb" + - "lib/order_txt.rb" + - "lib/render_pdf.rb" + - "plugins/wiki/lib/foodsoft_wiki/mailer.rb" # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods. Lint/UselessAccessModifier: Exclude: - - 'lib/token_verifier.rb' - - 'plugins/messages/app/models/messagegroup.rb' + - "lib/token_verifier.rb" + - "plugins/messages/app/models/messagegroup.rb" # Offense count: 14 Lint/UselessAssignment: Exclude: - - 'app/controllers/admin/ordergroups_controller.rb' - - 'app/helpers/admin/configs_helper.rb' - - 'app/inputs/date_picker_time_input.rb' - - 'app/models/order_article.rb' - - 'db/migrate/003_create_suppliers.rb' - - 'db/migrate/004_create_article_meta.rb' - - 'db/migrate/005_create_financial_transactions.rb' - - 'db/migrate/008_create_orders.rb' - - 'db/migrate/20181201000100_create_message_recipients.foodsoft_messages.rb' - - 'plugins/current_orders/app/documents/multiple_orders_by_articles.rb' - - 'plugins/current_orders/app/documents/multiple_orders_by_groups.rb' - - 'spec/lib/foodsoft_config_spec.rb' + - "app/controllers/admin/ordergroups_controller.rb" + - "app/helpers/admin/configs_helper.rb" + - "app/inputs/date_picker_time_input.rb" + - "app/models/order_article.rb" + - "db/migrate/003_create_suppliers.rb" + - "db/migrate/004_create_article_meta.rb" + - "db/migrate/005_create_financial_transactions.rb" + - "db/migrate/008_create_orders.rb" + - "db/migrate/20181201000100_create_message_recipients.foodsoft_messages.rb" + - "plugins/current_orders/app/documents/multiple_orders_by_articles.rb" + - "plugins/current_orders/app/documents/multiple_orders_by_groups.rb" + - "spec/lib/foodsoft_config_spec.rb" # Offense count: 1 # Configuration parameters: CheckForMethodsWithNoSideEffects. Lint/Void: Exclude: - - 'lib/foodsoft_config.rb' + - "lib/foodsoft_config.rb" # Offense count: 160 -# Configuration parameters: IgnoredMethods, CountRepeatedAttributes. +# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes. Metrics/AbcSize: Max: 143 -# Offense count: 73 -# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. -# IgnoredMethods: refine +# Offense count: 17 +# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, inherit_mode. +# AllowedMethods: refine Metrics/BlockLength: - Max: 374 + Max: 210 # Offense count: 6 # Configuration parameters: CountBlocks. @@ -279,13 +278,13 @@ Metrics/BlockNesting: Metrics/ClassLength: Max: 288 -# Offense count: 51 -# Configuration parameters: IgnoredMethods. +# Offense count: 52 +# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods. Metrics/CyclomaticComplexity: Max: 22 -# Offense count: 158 -# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. +# Offense count: 163 +# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods. Metrics/MethodLength: Max: 112 @@ -300,47 +299,47 @@ Metrics/ParameterLists: Max: 6 # Offense count: 36 -# Configuration parameters: IgnoredMethods. +# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods. Metrics/PerceivedComplexity: Max: 23 # Offense count: 6 Naming/AccessorMethodName: Exclude: - - 'app/controllers/admin/configs_controller.rb' - - 'lib/bank_account_connector.rb' - - 'lib/foodsoft_config.rb' - - 'spec/integration/config_spec.rb' + - "app/controllers/admin/configs_controller.rb" + - "lib/bank_account_connector.rb" + - "lib/foodsoft_config.rb" + - "spec/integration/config_spec.rb" # Offense count: 1 # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. Naming/BlockParameterName: Exclude: - - 'db/migrate/008_create_orders.rb' + - "db/migrate/008_create_orders.rb" # Offense count: 1 # Configuration parameters: EnforcedStyleForLeadingUnderscores. # SupportedStylesForLeadingUnderscores: disallowed, required, optional Naming/MemoizedInstanceVariableName: Exclude: - - 'plugins/messages/app/models/message.rb' + - "plugins/messages/app/models/message.rb" # Offense count: 19 # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. -# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to +# AllowedNames: as, at, by, db, id, in, io, ip, of, on, os, pp, to Naming/MethodParameterName: Exclude: - - 'app/controllers/api/v1/base_controller.rb' - - 'app/controllers/api/v1/user/group_order_articles_controller.rb' - - 'app/helpers/application_helper.rb' - - 'app/helpers/orders_helper.rb' - - 'app/models/user.rb' - - 'lib/foodsoft_date_util.rb' - - 'lib/render_pdf.rb' - - 'spec/integration/config_spec.rb' - - 'spec/integration/receive_spec.rb' - - 'spec/models/order_article_spec.rb' - - 'spec/support/shared_database.rb' + - "app/controllers/api/v1/base_controller.rb" + - "app/controllers/api/v1/user/group_order_articles_controller.rb" + - "app/helpers/application_helper.rb" + - "app/helpers/orders_helper.rb" + - "app/models/user.rb" + - "lib/foodsoft_date_util.rb" + - "lib/render_pdf.rb" + - "spec/integration/config_spec.rb" + - "spec/integration/receive_spec.rb" + - "spec/models/order_article_spec.rb" + - "spec/support/shared_database.rb" # Offense count: 11 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros. @@ -350,292 +349,292 @@ Naming/MethodParameterName: # MethodDefinitionMacros: define_method, define_singleton_method Naming/PredicateName: Exclude: - - 'app/models/financial_transaction_class.rb' - - 'app/models/financial_transaction_type.rb' - - 'app/models/order.rb' - - 'app/models/periodic_task_group.rb' - - 'app/models/supplier.rb' - - 'app/models/task.rb' - - 'app/models/user.rb' - - 'app/serializers/order_serializer.rb' - - 'plugins/messages/app/models/message.rb' + - "app/models/financial_transaction_class.rb" + - "app/models/financial_transaction_type.rb" + - "app/models/order.rb" + - "app/models/periodic_task_group.rb" + - "app/models/supplier.rb" + - "app/models/task.rb" + - "app/models/user.rb" + - "app/serializers/order_serializer.rb" + - "plugins/messages/app/models/message.rb" # Offense count: 45 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: PreferredName. Naming/RescuedExceptionsVariableName: Enabled: false # Offense count: 22 -# Configuration parameters: EnforcedStyle, AllowedIdentifiers. +# Configuration parameters: EnforcedStyle, AllowedIdentifiers, AllowedPatterns. # SupportedStyles: snake_case, camelCase Naming/VariableName: Exclude: - - 'app/controllers/concerns/auth.rb' - - 'app/helpers/application_helper.rb' - - 'db/migrate/008_create_orders.rb' - - 'lib/bank_account_information_importer.rb' + - "app/controllers/concerns/auth.rb" + - "app/helpers/application_helper.rb" + - "db/migrate/008_create_orders.rb" + - "lib/bank_account_information_importer.rb" # Offense count: 23 -# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers. +# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns. # SupportedStyles: snake_case, normalcase, non_integer # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339 Naming/VariableNumber: Exclude: - - 'app/documents/order_matrix.rb' - - 'spec/api/v1/swagger_spec.rb' - - 'spec/api/v1/user/group_order_articles_spec.rb' - - 'spec/api/v1/user/ordergroup_spec.rb' + - "app/documents/order_matrix.rb" + - "spec/api/v1/swagger_spec.rb" + - "spec/api/v1/user/group_order_articles_spec.rb" + - "spec/api/v1/user/ordergroup_spec.rb" # Offense count: 4 RSpec/AnyInstance: Exclude: - - 'spec/api/v1/swagger_spec.rb' - - 'spec/api/v1/user/group_order_articles_spec.rb' + - "spec/api/v1/swagger_spec.rb" + - "spec/api/v1/user/group_order_articles_spec.rb" # Offense count: 2 RSpec/BeforeAfterAll: Exclude: - - 'spec/lib/foodsoft_mail_receiver_spec.rb' + - "spec/lib/foodsoft_mail_receiver_spec.rb" # Offense count: 9 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnabledMethods. RSpec/Capybara/FeatureMethods: Exclude: - - 'spec/integration/articles_spec.rb' - - 'spec/integration/balancing_spec.rb' - - 'spec/integration/config_spec.rb' - - 'spec/integration/login_spec.rb' - - 'spec/integration/order_spec.rb' - - 'spec/integration/product_distribution_example_spec.rb' - - 'spec/integration/receive_spec.rb' - - 'spec/integration/session_spec.rb' - - 'spec/integration/supplier_spec.rb' + - "spec/integration/articles_spec.rb" + - "spec/integration/balancing_spec.rb" + - "spec/integration/config_spec.rb" + - "spec/integration/login_spec.rb" + - "spec/integration/order_spec.rb" + - "spec/integration/product_distribution_example_spec.rb" + - "spec/integration/receive_spec.rb" + - "spec/integration/session_spec.rb" + - "spec/integration/supplier_spec.rb" + +# Offense count: 4 +RSpec/Capybara/SpecificMatcher: + Exclude: + - "spec/integration/login_spec.rb" + - "spec/integration/session_spec.rb" # Offense count: 27 -# Configuration parameters: Prefixes. +# Configuration parameters: Prefixes, AllowedPatterns. # Prefixes: when, with, without RSpec/ContextWording: Exclude: - - 'spec/api/v1/swagger_spec.rb' - - 'spec/api/v1/user/group_order_articles_spec.rb' - - 'spec/models/order_article_spec.rb' - - 'spec/models/supplier_spec.rb' + - "spec/api/v1/swagger_spec.rb" + - "spec/api/v1/user/group_order_articles_spec.rb" + - "spec/models/order_article_spec.rb" + - "spec/models/supplier_spec.rb" # Offense count: 1 # Configuration parameters: IgnoredMetadata. RSpec/DescribeClass: Exclude: - - 'spec/api/v1/swagger_spec.rb' + - "spec/api/v1/swagger_spec.rb" -# Offense count: 101 -# Cop supports --auto-correct. +# Offense count: 126 +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: SkipBlocks, EnforcedStyle. # SupportedStyles: described_class, explicit RSpec/DescribedClass: Exclude: - - 'spec/lib/bank_transaction_reference_spec.rb' - - 'spec/lib/foodsoft_config_spec.rb' - - 'spec/lib/foodsoft_mail_receiver_spec.rb' - - 'spec/lib/token_verifier_spec.rb' - - 'spec/models/group_order_article_spec.rb' - - 'spec/models/order_article_spec.rb' - - 'spec/models/order_spec.rb' - - 'spec/models/ordergroup_spec.rb' - - 'spec/models/user_spec.rb' + - "spec/lib/bank_transaction_reference_spec.rb" + - "spec/lib/foodsoft_config_spec.rb" + - "spec/lib/foodsoft_mail_receiver_spec.rb" + - "spec/lib/token_verifier_spec.rb" + - "spec/models/group_order_article_spec.rb" + - "spec/models/order_article_spec.rb" + - "spec/models/order_spec.rb" + - "spec/models/ordergroup_spec.rb" + - "spec/models/user_spec.rb" -# Offense count: 59 +# Offense count: 65 # Configuration parameters: CountAsOne. RSpec/ExampleLength: Max: 81 -# Offense count: 2 -# Cop supports --auto-correct. -RSpec/FactoryBot/SyntaxMethods: - Exclude: - - 'spec/integration/articles_spec.rb' - - 'spec/models/article_spec.rb' - # Offense count: 7 # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. # Include: **/*_spec*rb*, **/spec/**/* RSpec/FilePath: Exclude: - - 'spec/api/v1/order_articles_spec.rb' - - 'spec/api/v1/user/financial_transactions_spec.rb' - - 'spec/api/v1/user/group_order_articles_spec.rb' - - 'spec/api/v1/user/ordergroup_spec.rb' - - 'spec/integration/articles_spec.rb' - - 'spec/integration/login_spec.rb' - - 'spec/lib/bank_account_information_importer_spec.rb' + - "spec/api/v1/order_articles_spec.rb" + - "spec/api/v1/user/financial_transactions_spec.rb" + - "spec/api/v1/user/group_order_articles_spec.rb" + - "spec/api/v1/user/ordergroup_spec.rb" + - "spec/integration/articles_spec.rb" + - "spec/integration/login_spec.rb" + - "spec/lib/bank_account_information_importer_spec.rb" # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: implicit, each, example RSpec/HookArgument: Exclude: - - 'spec/spec_helper.rb' + - "spec/spec_helper.rb" # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). RSpec/HooksBeforeExamples: Exclude: - - 'spec/integration/balancing_spec.rb' - - 'spec/lib/foodsoft_mail_receiver_spec.rb' + - "spec/integration/balancing_spec.rb" + - "spec/lib/foodsoft_mail_receiver_spec.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: single_line_only, single_statement_only, disallow RSpec/ImplicitSubject: Exclude: - - 'spec/api/v1/swagger_spec.rb' + - "spec/api/v1/swagger_spec.rb" # Offense count: 6 # Configuration parameters: AssignmentOnly. RSpec/InstanceVariable: Exclude: - - 'spec/lib/foodsoft_mail_receiver_spec.rb' + - "spec/lib/foodsoft_mail_receiver_spec.rb" # Offense count: 2 RSpec/IteratedExpectation: Exclude: - - 'spec/models/order_spec.rb' - - 'spec/models/supplier_spec.rb' + - "spec/models/order_spec.rb" + - "spec/models/supplier_spec.rb" # Offense count: 13 RSpec/LetSetup: Exclude: - - 'spec/api/v1/swagger_spec.rb' - - 'spec/api/v1/user/group_order_articles_spec.rb' - - 'spec/api/v1/user/ordergroup_spec.rb' - - 'spec/models/bank_transaction_spec.rb' - - 'spec/models/group_order_article_spec.rb' - - 'spec/models/supplier_spec.rb' + - "spec/api/v1/swagger_spec.rb" + - "spec/api/v1/user/group_order_articles_spec.rb" + - "spec/api/v1/user/ordergroup_spec.rb" + - "spec/models/bank_transaction_spec.rb" + - "spec/models/group_order_article_spec.rb" + - "spec/models/supplier_spec.rb" # Offense count: 3 RSpec/MissingExampleGroupArgument: Exclude: - - 'spec/models/group_order_article_spec.rb' - - 'spec/models/group_order_spec.rb' - - 'spec/models/user_spec.rb' + - "spec/models/group_order_article_spec.rb" + - "spec/models/group_order_spec.rb" + - "spec/models/user_spec.rb" -# Offense count: 87 +# Offense count: 88 RSpec/MultipleExpectations: Max: 22 -# Offense count: 80 +# Offense count: 83 # Configuration parameters: AllowSubject. RSpec/MultipleMemoizedHelpers: Max: 17 # Offense count: 29 +# Configuration parameters: AllowedGroups. RSpec/NestedGroups: Max: 6 # Offense count: 31 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: not_to, to_not RSpec/NotToNot: Exclude: - - 'spec/api/v1/user/financial_transactions_spec.rb' - - 'spec/api/v1/user/group_order_articles_spec.rb' - - 'spec/integration/balancing_spec.rb' - - 'spec/integration/login_spec.rb' - - 'spec/integration/receive_spec.rb' - - 'spec/integration/session_spec.rb' - - 'spec/lib/token_verifier_spec.rb' - - 'spec/models/article_spec.rb' - - 'spec/models/order_spec.rb' - - 'spec/models/supplier_spec.rb' + - "spec/api/v1/user/financial_transactions_spec.rb" + - "spec/api/v1/user/group_order_articles_spec.rb" + - "spec/integration/balancing_spec.rb" + - "spec/integration/login_spec.rb" + - "spec/integration/receive_spec.rb" + - "spec/integration/session_spec.rb" + - "spec/lib/token_verifier_spec.rb" + - "spec/models/article_spec.rb" + - "spec/models/order_spec.rb" + - "spec/models/supplier_spec.rb" # Offense count: 8 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers. # SupportedStyles: inflected, explicit RSpec/PredicateMatcher: Exclude: - - 'spec/models/article_spec.rb' - - 'spec/models/user_spec.rb' + - "spec/models/article_spec.rb" + - "spec/models/user_spec.rb" # Offense count: 6 RSpec/RepeatedDescription: Exclude: - - 'spec/lib/bank_account_information_importer_spec.rb' - - 'spec/lib/bank_transaction_reference_spec.rb' - - 'spec/lib/foodsoft_mail_receiver_spec.rb' + - "spec/lib/bank_account_information_importer_spec.rb" + - "spec/lib/bank_transaction_reference_spec.rb" + - "spec/lib/foodsoft_mail_receiver_spec.rb" # Offense count: 4 RSpec/RepeatedExample: Exclude: - - 'spec/lib/bank_transaction_reference_spec.rb' - - 'spec/lib/foodsoft_mail_receiver_spec.rb' + - "spec/lib/bank_transaction_reference_spec.rb" + - "spec/lib/foodsoft_mail_receiver_spec.rb" # Offense count: 7 RSpec/ScatteredSetup: Exclude: - - 'spec/api/v1/user/ordergroup_spec.rb' - - 'spec/integration/balancing_spec.rb' - - 'spec/integration/login_spec.rb' + - "spec/api/v1/user/ordergroup_spec.rb" + - "spec/integration/balancing_spec.rb" + - "spec/integration/login_spec.rb" # Offense count: 1 # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames. RSpec/VerifiedDoubles: Exclude: - - 'spec/support/api_oauth.rb' + - "spec/support/api_oauth.rb" # Offense count: 45 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). Rails/ActiveRecordAliases: Enabled: false # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/ActiveRecordCallbacksOrder: Exclude: - - 'app/models/financial_transaction_type.rb' - - 'app/models/order.rb' - - 'app/models/stock_change.rb' + - "app/models/financial_transaction_type.rb" + - "app/models/order.rb" + - "app/models/stock_change.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). Rails/ApplicationMailer: Exclude: - - 'app/mailers/mailer.rb' + - "app/mailers/mailer.rb" # Offense count: 20 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). Rails/ApplicationRecord: Exclude: - - 'app/models/supplier_category.rb' - - 'db/migrate/20130718183101_migrate_user_settings.rb' - - 'db/migrate/20181201000100_create_message_recipients.foodsoft_messages.rb' - - 'db/migrate/20181201000301_change_ordergroup_default_in_financial_transaction.rb' - - 'db/migrate/20181201000302_change_stock_supplier_to_null_in_order.rb' - - 'db/migrate/20181201000305_ensure_article_for_article_price.rb' - - 'db/migrate/20181201000400_create_supplier_categories.rb' - - 'db/migrate/20181204000000_clear_invalid_invoices_from_orders.rb' - - 'db/migrate/20181204070000_create_stock_events.rb' - - 'plugins/messages/app/models/message_recipient.rb' - - 'plugins/polls/app/models/poll.rb' - - 'plugins/polls/app/models/poll_choice.rb' - - 'plugins/polls/app/models/poll_vote.rb' - - 'plugins/printer/app/models/printer_job.rb' - - 'plugins/printer/app/models/printer_job_update.rb' + - "app/models/supplier_category.rb" + - "db/migrate/20130718183101_migrate_user_settings.rb" + - "db/migrate/20181201000100_create_message_recipients.foodsoft_messages.rb" + - "db/migrate/20181201000301_change_ordergroup_default_in_financial_transaction.rb" + - "db/migrate/20181201000302_change_stock_supplier_to_null_in_order.rb" + - "db/migrate/20181201000305_ensure_article_for_article_price.rb" + - "db/migrate/20181201000400_create_supplier_categories.rb" + - "db/migrate/20181204000000_clear_invalid_invoices_from_orders.rb" + - "db/migrate/20181204070000_create_stock_events.rb" + - "plugins/messages/app/models/message_recipient.rb" + - "plugins/polls/app/models/poll.rb" + - "plugins/polls/app/models/poll_choice.rb" + - "plugins/polls/app/models/poll_vote.rb" + - "plugins/printer/app/models/printer_job.rb" + - "plugins/printer/app/models/printer_job_update.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent. Rails/Blank: Exclude: - - 'app/controllers/api/v1/base_controller.rb' + - "app/controllers/api/v1/base_controller.rb" -# Offense count: 33 +# Offense count: 34 # Configuration parameters: Include. # Include: db/migrate/*.rb Rails/CreateTableWithTimestamps: @@ -646,14 +645,14 @@ Rails/CreateTableWithTimestamps: # SupportedStyles: strict, flexible Rails/Date: Exclude: - - 'app/controllers/deliveries_controller.rb' - - 'app/documents/order_fax.rb' - - 'app/models/periodic_task_group.rb' - - 'spec/integration/order_spec.rb' - - 'spec/models/order_spec.rb' + - "app/controllers/deliveries_controller.rb" + - "app/documents/order_fax.rb" + - "app/models/periodic_task_group.rb" + - "spec/integration/order_spec.rb" + - "spec/models/order_spec.rb" -# Offense count: 66 -# Cop supports --auto-correct-all. +# Offense count: 67 +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Whitelist, AllowedMethods, AllowedReceivers. # Whitelist: find_by_sql # AllowedMethods: find_by_sql @@ -662,214 +661,215 @@ Rails/DynamicFindBy: Enabled: false # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/EnumHash: Exclude: - - 'app/models/order.rb' + - "app/models/order.rb" -# Offense count: 9 +# Offense count: 8 # Configuration parameters: EnforcedStyle. # SupportedStyles: slashes, arguments Rails/FilePath: Exclude: - - 'config/application.rb' - - 'config/initializers/secret_token.rb' - - 'lib/order_txt.rb' - - 'lib/render_csv.rb' - - 'lib/render_pdf.rb' - - 'plugins/current_orders/app/documents/multiple_orders_by_groups.rb' - - 'spec/api/v1/swagger_spec.rb' + - "config/application.rb" + - "config/initializers/secret_token.rb" + - "lib/order_txt.rb" + - "lib/render_csv.rb" + - "lib/render_pdf.rb" + - "plugins/current_orders/app/documents/multiple_orders_by_groups.rb" + - "spec/api/v1/swagger_spec.rb" # Offense count: 7 -# Cop supports --auto-correct. -# Configuration parameters: Include, IgnoredMethods. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Include, AllowedMethods, AllowedPatterns, IgnoredMethods. # Include: app/models/**/*.rb +# AllowedMethods: order, limit, select, lock # IgnoredMethods: order, limit, select, lock Rails/FindEach: Exclude: - - 'app/models/bank_account.rb' - - 'app/models/order.rb' - - 'app/models/ordergroup.rb' - - 'app/models/periodic_task_group.rb' - - 'app/models/task.rb' + - "app/models/bank_account.rb" + - "app/models/order.rb" + - "app/models/ordergroup.rb" + - "app/models/periodic_task_group.rb" + - "app/models/task.rb" # Offense count: 26 # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/HasManyOrHasOneDependent: Exclude: - - 'app/models/article.rb' - - 'app/models/article_category.rb' - - 'app/models/article_price.rb' - - 'app/models/financial_link.rb' - - 'app/models/financial_transaction.rb' - - 'app/models/group_order.rb' - - 'app/models/order.rb' - - 'app/models/ordergroup.rb' - - 'app/models/shared_supplier.rb' - - 'app/models/stock_article.rb' - - 'app/models/supplier.rb' - - 'app/models/supplier_category.rb' - - 'app/models/user.rb' - - 'app/models/workgroup.rb' + - "app/models/article.rb" + - "app/models/article_category.rb" + - "app/models/article_price.rb" + - "app/models/financial_link.rb" + - "app/models/financial_transaction.rb" + - "app/models/group_order.rb" + - "app/models/order.rb" + - "app/models/ordergroup.rb" + - "app/models/shared_supplier.rb" + - "app/models/stock_article.rb" + - "app/models/supplier.rb" + - "app/models/supplier_category.rb" + - "app/models/user.rb" + - "app/models/workgroup.rb" # Offense count: 14 # Configuration parameters: Include. # Include: app/helpers/**/*.rb Rails/HelperInstanceVariable: Exclude: - - 'app/helpers/admin/configs_helper.rb' - - 'app/helpers/application_helper.rb' - - 'app/helpers/orders_helper.rb' + - "app/helpers/admin/configs_helper.rb" + - "app/helpers/application_helper.rb" + - "app/helpers/orders_helper.rb" # Offense count: 14 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: numeric, symbolic Rails/HttpStatus: Exclude: - - 'app/controllers/admin/bank_accounts_controller.rb' - - 'app/controllers/admin/financial_transaction_classes_controller.rb' - - 'app/controllers/admin/financial_transaction_types_controller.rb' - - 'app/controllers/api/v1/base_controller.rb' - - 'app/controllers/styles_controller.rb' - - 'plugins/links/app/controllers/links_controller.rb' + - "app/controllers/admin/bank_accounts_controller.rb" + - "app/controllers/admin/financial_transaction_classes_controller.rb" + - "app/controllers/admin/financial_transaction_types_controller.rb" + - "app/controllers/api/v1/base_controller.rb" + - "app/controllers/styles_controller.rb" + - "plugins/links/app/controllers/links_controller.rb" # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Rails/IndexBy: Exclude: - - 'app/models/order.rb' - - 'spec/api/v1/user/ordergroup_spec.rb' + - "app/models/order.rb" + - "spec/api/v1/user/ordergroup_spec.rb" # Offense count: 23 # Configuration parameters: IgnoreScopes, Include. # Include: app/models/**/*.rb Rails/InverseOf: Exclude: - - 'app/models/article.rb' - - 'app/models/bank_transaction.rb' - - 'app/models/financial_transaction.rb' - - 'app/models/group_order.rb' - - 'app/models/invoice.rb' - - 'app/models/mail_delivery_status.rb' - - 'app/models/order.rb' - - 'app/models/shared_article.rb' - - 'app/models/shared_supplier.rb' - - 'app/models/stock_change.rb' - - 'app/models/supplier.rb' - - 'app/models/task.rb' - - 'app/models/user.rb' - - 'app/models/workgroup.rb' + - "app/models/article.rb" + - "app/models/bank_transaction.rb" + - "app/models/financial_transaction.rb" + - "app/models/group_order.rb" + - "app/models/invoice.rb" + - "app/models/mail_delivery_status.rb" + - "app/models/order.rb" + - "app/models/shared_article.rb" + - "app/models/shared_supplier.rb" + - "app/models/stock_change.rb" + - "app/models/supplier.rb" + - "app/models/task.rb" + - "app/models/user.rb" + - "app/models/workgroup.rb" # Offense count: 2 # Configuration parameters: Include. -# Include: app/controllers/**/*.rb +# Include: app/controllers/**/*.rb, app/mailers/**/*.rb Rails/LexicallyScopedActionFilter: Exclude: - - 'app/controllers/group_orders_controller.rb' - - 'app/controllers/suppliers_controller.rb' + - "app/controllers/group_orders_controller.rb" + - "app/controllers/suppliers_controller.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Rails/LinkToBlank: Exclude: - - 'app/helpers/application_helper.rb' + - "app/helpers/application_helper.rb" # Offense count: 3 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). Rails/NegateInclude: Exclude: - - 'app/helpers/application_helper.rb' - - 'app/models/supplier.rb' - - 'lib/tasks/foodsoft_setup.rake' + - "app/helpers/application_helper.rb" + - "app/models/supplier.rb" + - "lib/tasks/foodsoft_setup.rake" # Offense count: 34 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Include. # Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb Rails/Output: Exclude: - - 'config/initializers/resque.rb' - - 'config/initializers/secret_token.rb' - - 'db/migrate/001_create_users.rb' - - 'db/migrate/002_create_groups.rb' - - 'db/migrate/003_create_suppliers.rb' - - 'db/migrate/004_create_article_meta.rb' - - 'db/migrate/005_create_financial_transactions.rb' - - 'db/migrate/006_create_articles.rb' - - 'db/migrate/007_create_article_prices.rb' - - 'db/migrate/008_create_orders.rb' - - 'db/migrate/021_remove_table_article_prices.rb' - - 'db/migrate/20090120184410_road_to_version_three.rb' - - 'db/migrate/20130622095040_move_weekly_tasks.rb' + - "config/initializers/resque.rb" + - "config/initializers/secret_token.rb" + - "db/migrate/001_create_users.rb" + - "db/migrate/002_create_groups.rb" + - "db/migrate/003_create_suppliers.rb" + - "db/migrate/004_create_article_meta.rb" + - "db/migrate/005_create_financial_transactions.rb" + - "db/migrate/006_create_articles.rb" + - "db/migrate/007_create_article_prices.rb" + - "db/migrate/008_create_orders.rb" + - "db/migrate/021_remove_table_article_prices.rb" + - "db/migrate/20090120184410_road_to_version_three.rb" + - "db/migrate/20130622095040_move_weekly_tasks.rb" # Offense count: 28 Rails/OutputSafety: Exclude: - - 'app/helpers/admin/configs_helper.rb' - - 'app/helpers/application_helper.rb' - - 'app/helpers/deliveries_helper.rb' - - 'app/helpers/orders_helper.rb' - - 'app/helpers/tasks_helper.rb' - - 'plugins/messages/app/helpers/messages_helper.rb' - - 'plugins/wiki/app/helpers/pages_helper.rb' + - "app/helpers/admin/configs_helper.rb" + - "app/helpers/application_helper.rb" + - "app/helpers/deliveries_helper.rb" + - "app/helpers/orders_helper.rb" + - "app/helpers/tasks_helper.rb" + - "plugins/messages/app/helpers/messages_helper.rb" + - "plugins/wiki/app/helpers/pages_helper.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Rails/Pluck: Exclude: - - 'lib/ordergroups_csv.rb' + - "lib/ordergroups_csv.rb" # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Rails/PluralizationGrammar: Exclude: - - 'app/controllers/application_controller.rb' - - 'lib/tasks/foodsoft.rake' + - "app/controllers/application_controller.rb" + - "lib/tasks/foodsoft.rake" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Rails/Presence: Exclude: - - 'db/migrate/021_remove_table_article_prices.rb' + - "db/migrate/021_remove_table_article_prices.rb" # Offense count: 36 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: NotNilAndNotEmpty, NotBlank, UnlessBlank. Rails/Present: Enabled: false # Offense count: 6 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Include. # Include: **/Rakefile, **/*.rake Rails/RakeEnvironment: Exclude: - - 'lib/tasks/foodsoft_setup.rake' - - 'lib/tasks/resque.rake' + - "lib/tasks/foodsoft_setup.rake" + - "lib/tasks/resque.rake" # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Rails/RedundantForeignKey: Exclude: - - 'app/models/financial_transaction.rb' - - 'plugins/messages/app/models/message.rb' + - "app/models/financial_transaction.rb" + - "plugins/messages/app/models/message.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). Rails/RedundantPresenceValidationOnBelongsTo: Exclude: - - 'app/models/financial_transaction_type.rb' + - "app/models/financial_transaction_type.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: ConvertTry. Rails/SafeNavigation: Exclude: - - 'app/models/group_order_article.rb' + - "app/models/group_order_article.rb" # Offense count: 63 # Configuration parameters: ForbiddenMethods, AllowedMethods. @@ -878,15 +878,15 @@ Rails/SkipsModelValidations: Enabled: false # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). Rails/SquishedSQLHeredocs: Exclude: - - 'app/controllers/finance/financial_links_controller.rb' - - 'app/models/financial_link.rb' - - 'db/migrate/20181201000305_ensure_article_for_article_price.rb' + - "app/controllers/finance/financial_links_controller.rb" + - "app/models/financial_link.rb" + - "db/migrate/20181201000305_ensure_article_for_article_price.rb" -# Offense count: 34 -# Cop supports --auto-correct. +# Offense count: 41 +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: strict, flexible Rails/TimeZone: @@ -895,579 +895,578 @@ Rails/TimeZone: # Offense count: 1 Rails/TransactionExitStatement: Exclude: - - 'app/models/bank_transaction.rb' + - "app/models/bank_transaction.rb" # Offense count: 3 # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/UniqueValidationWithoutIndex: Exclude: - - 'app/models/bank_account.rb' - - 'app/models/supplier_category.rb' + - "app/models/bank_account.rb" + - "app/models/supplier_category.rb" # Offense count: 2 # Configuration parameters: Environments. # Environments: development, test, production Rails/UnknownEnv: Exclude: - - 'config/initializers/gaffe.rb' - - 'config/initializers/secret_token.rb' + - "config/initializers/gaffe.rb" + - "config/initializers/secret_token.rb" -# Offense count: 68 -# Cop supports --auto-correct. +# Offense count: 69 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/Validation: Enabled: false # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). Rails/WhereEquals: Exclude: - - 'app/controllers/finance/invoices_controller.rb' - - 'app/models/financial_transaction.rb' + - "app/controllers/finance/invoices_controller.rb" + - "app/models/financial_transaction.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: exists, where Rails/WhereExists: Exclude: - - 'app/models/concerns/mark_as_deleted_with_name.rb' + - "app/models/concerns/mark_as_deleted_with_name.rb" # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Rails/WhereNot: Exclude: - - 'db/migrate/20140921104907_remove_stale_memberships.rb' - - 'db/migrate/20210205090257_introduce_received_state_in_orders.rb' + - "db/migrate/20140921104907_remove_stale_memberships.rb" + - "db/migrate/20210205090257_introduce_received_state_in_orders.rb" # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). Security/YAMLLoad: Exclude: - - 'app/controllers/finance/bank_accounts_controller.rb' - - 'db/migrate/20130718183101_migrate_user_settings.rb' - - 'db/migrate/20181201000100_create_message_recipients.foodsoft_messages.rb' - - 'lib/foodsoft_config.rb' - - 'spec/api/v1/swagger_spec.rb' + - "app/controllers/finance/bank_accounts_controller.rb" + - "db/migrate/20130718183101_migrate_user_settings.rb" + - "db/migrate/20181201000100_create_message_recipients.foodsoft_messages.rb" + - "lib/foodsoft_config.rb" + - "spec/api/v1/swagger_spec.rb" # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: prefer_alias, prefer_alias_method Style/Alias: Exclude: - - 'config/initializers/session_store.rb' - - 'plugins/discourse/lib/foodsoft_discourse/redirect_to_login.rb' - - 'plugins/printer/lib/foodsoft_printer/order_printer_jobs.rb' + - "config/initializers/session_store.rb" + - "plugins/discourse/lib/foodsoft_discourse/redirect_to_login.rb" + - "plugins/printer/lib/foodsoft_printer/order_printer_jobs.rb" # Offense count: 4 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: always, conditionals Style/AndOr: Exclude: - - 'config/initializers/extensions.rb' - - 'lib/apple_bar.rb' - - 'plugins/documents/app/controllers/documents_controller.rb' - - 'spec/support/coverage.rb' + - "config/initializers/extensions.rb" + - "lib/apple_bar.rb" + - "plugins/documents/app/controllers/documents_controller.rb" + - "spec/support/coverage.rb" # Offense count: 19 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods. # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object # FunctionalMethods: let, let!, subject, watch -# IgnoredMethods: lambda, proc, it +# AllowedMethods: lambda, proc, it Style/BlockDelimiters: Exclude: - - 'app/controllers/api/v1/user/ordergroup_controller.rb' - - 'app/helpers/group_orders_helper.rb' - - 'app/helpers/orders_helper.rb' - - 'app/models/order.rb' - - 'db/migrate/008_create_orders.rb' - - 'lib/tasks/resque.rake' - - 'spec/api/v1/user/group_order_articles_spec.rb' - - 'spec/factories/user.rb' - - 'spec/lib/foodsoft_mail_receiver_spec.rb' - - 'spec/support/coverage.rb' + - "app/controllers/api/v1/user/ordergroup_controller.rb" + - "app/helpers/group_orders_helper.rb" + - "app/helpers/orders_helper.rb" + - "app/models/order.rb" + - "db/migrate/008_create_orders.rb" + - "lib/tasks/resque.rake" + - "spec/api/v1/user/group_order_articles_spec.rb" + - "spec/factories/user.rb" + - "spec/lib/foodsoft_mail_receiver_spec.rb" + - "spec/support/coverage.rb" # Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: AllowOnConstant. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowOnConstant, AllowOnSelfClass. Style/CaseEquality: Exclude: - - 'lib/tasks/foodsoft_setup.rake' + - "lib/tasks/foodsoft_setup.rake" # Offense count: 7 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). Style/CaseLikeIf: Exclude: - - 'app/helpers/admin/configs_helper.rb' - - 'app/helpers/group_orders_helper.rb' - - 'app/models/order.rb' - - 'lib/foodsoft_date_util.rb' - - 'lib/render_pdf.rb' - - 'lib/tasks/foodsoft_setup.rake' - - 'plugins/uservoice/lib/foodsoft_uservoice.rb' + - "app/helpers/admin/configs_helper.rb" + - "app/helpers/group_orders_helper.rb" + - "app/models/order.rb" + - "lib/foodsoft_date_util.rb" + - "lib/render_pdf.rb" + - "lib/tasks/foodsoft_setup.rake" + - "plugins/uservoice/lib/foodsoft_uservoice.rb" -# Offense count: 53 -# Cop supports --auto-correct. +# Offense count: 55 +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: nested, compact Style/ClassAndModuleChildren: Enabled: false # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: is_a?, kind_of? Style/ClassCheck: Exclude: - - 'app/helpers/orders_helper.rb' + - "app/helpers/orders_helper.rb" # Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: IgnoredMethods. -# IgnoredMethods: ==, equal?, eql? +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods. +# AllowedMethods: ==, equal?, eql? Style/ClassEqualityComparison: Exclude: - - 'spec/factories/supplier.rb' + - "spec/factories/supplier.rb" # Offense count: 3 Style/ClassVars: Exclude: - - 'lib/bank_account_connector.rb' - - 'lib/foodsoft/expansion_variables.rb' - - 'lib/foodsoft_mail_receiver.rb' + - "lib/bank_account_connector.rb" + - "lib/foodsoft/expansion_variables.rb" + - "lib/foodsoft_mail_receiver.rb" # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/ColonMethodCall: Exclude: - - 'app/models/supplier.rb' - - 'plugins/discourse/app/controllers/discourse_controller.rb' - - 'plugins/messages/app/mail_receivers/messages_mail_receiver.rb' + - "app/models/supplier.rb" + - "plugins/discourse/app/controllers/discourse_controller.rb" + - "plugins/messages/app/mail_receivers/messages_mail_receiver.rb" # Offense count: 7 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, AllowInnerBackticks. # SupportedStyles: backticks, percent_x, mixed Style/CommandLiteral: Exclude: - - 'lib/tasks/foodsoft_setup.rake' + - "lib/tasks/foodsoft_setup.rake" # Offense count: 10 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Keywords, RequireColon. # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE Style/CommentAnnotation: Exclude: - - 'app/controllers/admin/configs_controller.rb' - - 'app/inputs/delta_input.rb' - - 'app/models/order_article.rb' - - 'app/models/shared_supplier.rb' - - 'config/application.rb' - - 'spec/models/article_spec.rb' - - 'spec/models/order_spec.rb' - - 'spec/support/shared_database.rb' + - "app/controllers/admin/configs_controller.rb" + - "app/inputs/delta_input.rb" + - "app/models/order_article.rb" + - "app/models/shared_supplier.rb" + - "config/application.rb" + - "spec/models/article_spec.rb" + - "spec/models/order_spec.rb" + - "spec/support/shared_database.rb" # Offense count: 12 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). Style/CommentedKeyword: Exclude: - - 'app/controllers/deliveries_controller.rb' - - 'app/controllers/finance/balancing_controller.rb' - - 'app/controllers/orders_controller.rb' - - 'app/controllers/stock_takings_controller.rb' - - 'app/controllers/stockit_controller.rb' - - 'config/routes.rb' - - 'db/migrate/20090120184410_road_to_version_three.rb' + - "app/controllers/deliveries_controller.rb" + - "app/controllers/finance/balancing_controller.rb" + - "app/controllers/orders_controller.rb" + - "app/controllers/stock_takings_controller.rb" + - "app/controllers/stockit_controller.rb" + - "config/routes.rb" + - "db/migrate/20090120184410_road_to_version_three.rb" # Offense count: 13 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions. # SupportedStyles: assign_to_condition, assign_inside_condition Style/ConditionalAssignment: Exclude: - - 'app/controllers/application_controller.rb' - - 'app/controllers/articles_controller.rb' - - 'app/controllers/concerns/locale.rb' - - 'app/controllers/finance/bank_transactions_controller.rb' - - 'app/controllers/finance/financial_transactions_controller.rb' - - 'app/controllers/home_controller.rb' - - 'app/controllers/orders_controller.rb' - - 'plugins/documents/app/controllers/documents_controller.rb' - - 'plugins/messages/app/mail_receivers/messages_mail_receiver.rb' - - 'plugins/wiki/app/controllers/pages_controller.rb' + - "app/controllers/application_controller.rb" + - "app/controllers/articles_controller.rb" + - "app/controllers/concerns/locale.rb" + - "app/controllers/finance/bank_transactions_controller.rb" + - "app/controllers/finance/financial_transactions_controller.rb" + - "app/controllers/home_controller.rb" + - "app/controllers/orders_controller.rb" + - "plugins/documents/app/controllers/documents_controller.rb" + - "plugins/messages/app/mail_receivers/messages_mail_receiver.rb" + - "plugins/wiki/app/controllers/pages_controller.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/DefWithParentheses: Exclude: - - 'app/models/user.rb' + - "app/models/user.rb" -# Offense count: 314 +# Offense count: 322 # Configuration parameters: AllowedConstants. Style/Documentation: Enabled: false # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: allowed_in_returns, forbidden Style/DoubleNegation: Exclude: - - 'app/controllers/tasks_controller.rb' + - "app/controllers/tasks_controller.rb" # Offense count: 5 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, AllowComments. # SupportedStyles: empty, nil, both Style/EmptyElse: Exclude: - - 'app/helpers/application_helper.rb' - - 'app/models/article.rb' - - 'app/models/order_article.rb' - - 'app/models/user.rb' - - 'lib/token_verifier.rb' + - "app/helpers/application_helper.rb" + - "app/models/article.rb" + - "app/models/order_article.rb" + - "app/models/user.rb" + - "lib/token_verifier.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/EmptyLiteral: Exclude: - - 'plugins/wiki/app/helpers/pages_helper.rb' + - "plugins/wiki/app/helpers/pages_helper.rb" # Offense count: 14 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: compact, expanded Style/EmptyMethod: Exclude: - - 'app/controllers/articles_controller.rb' - - 'app/controllers/feedback_controller.rb' - - 'app/controllers/finance/invoices_controller.rb' - - 'app/controllers/home_controller.rb' - - 'app/controllers/login_controller.rb' - - 'app/mailers/mailer.rb' - - 'db/migrate/024_add_deposit_defaults.rb' - - 'db/migrate/20090120184410_road_to_version_three.rb' - - 'db/migrate/20090907120012_add_missing_indexes.rb' - - 'db/migrate/20130702113610_update_group_order_totals.rb' - - 'db/migrate/20130718183101_migrate_user_settings.rb' - - 'db/migrate/20140318173000_delete_empty_group_order_articles.rb' - - 'lib/bank_account_connector.rb' + - "app/controllers/articles_controller.rb" + - "app/controllers/feedback_controller.rb" + - "app/controllers/finance/invoices_controller.rb" + - "app/controllers/home_controller.rb" + - "app/controllers/login_controller.rb" + - "app/mailers/mailer.rb" + - "db/migrate/024_add_deposit_defaults.rb" + - "db/migrate/20090120184410_road_to_version_three.rb" + - "db/migrate/20090907120012_add_missing_indexes.rb" + - "db/migrate/20130702113610_update_group_order_totals.rb" + - "db/migrate/20130718183101_migrate_user_settings.rb" + - "db/migrate/20140318173000_delete_empty_group_order_articles.rb" + - "lib/bank_account_connector.rb" # Offense count: 21 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/ExpandPathArguments: Enabled: false # Offense count: 7 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/ExplicitBlockArgument: Exclude: - - 'app/documents/order_fax.rb' - - 'app/helpers/admin/configs_helper.rb' - - 'app/models/concerns/find_each_with_order.rb' - - 'plugins/current_orders/app/documents/multiple_orders_by_articles.rb' - - 'plugins/current_orders/app/documents/multiple_orders_by_groups.rb' + - "app/documents/order_fax.rb" + - "app/helpers/admin/configs_helper.rb" + - "app/models/concerns/find_each_with_order.rb" + - "plugins/current_orders/app/documents/multiple_orders_by_articles.rb" + - "plugins/current_orders/app/documents/multiple_orders_by_groups.rb" # Offense count: 1 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: left_coerce, right_coerce, single_coerce, fdiv Style/FloatDivision: Exclude: - - 'app/models/ordergroup.rb' + - "app/models/ordergroup.rb" # Offense count: 18 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: each, for Style/For: Exclude: - - 'app/controllers/admin/configs_controller.rb' - - 'app/models/delivery.rb' - - 'app/models/group_order.rb' - - 'app/models/order.rb' - - 'app/models/stock_taking.rb' - - 'app/models/supplier.rb' - - 'db/migrate/005_create_financial_transactions.rb' - - 'lib/tasks/foodsoft.rake' - - 'plugins/messages/app/mail_receivers/messages_mail_receiver.rb' - - 'plugins/wiki/app/views/pages/all.rss.builder' + - "app/controllers/admin/configs_controller.rb" + - "app/models/delivery.rb" + - "app/models/group_order.rb" + - "app/models/order.rb" + - "app/models/stock_taking.rb" + - "app/models/supplier.rb" + - "db/migrate/005_create_financial_transactions.rb" + - "lib/tasks/foodsoft.rake" + - "plugins/messages/app/mail_receivers/messages_mail_receiver.rb" + - "plugins/wiki/app/views/pages/all.rss.builder" # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: format, sprintf, percent Style/FormatString: Exclude: - - 'lib/order_txt.rb' + - "lib/order_txt.rb" # Offense count: 6 -# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns, IgnoredMethods. # SupportedStyles: annotated, template, unannotated Style/FormatStringToken: EnforcedStyle: unannotated -# Offense count: 490 -# Cop supports --auto-correct. +# Offense count: 498 +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: always, always_true, never Style/FrozenStringLiteralComment: Enabled: false # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). Style/GlobalStdStream: Exclude: - - 'config/environments/production.rb' - - 'lib/tasks/foodsoft.rake' - - 'lib/tasks/foodsoft_setup.rake' + - "config/environments/production.rb" + - "lib/tasks/foodsoft.rake" + - "lib/tasks/foodsoft_setup.rake" # Offense count: 61 -# Configuration parameters: MinBodyLength. +# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals. Style/GuardClause: Enabled: false # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: braces, no_braces Style/HashAsLastArrayItem: Exclude: - - 'app/models/order.rb' + - "app/models/order.rb" -# Offense count: 6 -# Cop supports --auto-correct. +# Offense count: 5 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowSplatArgument. Style/HashConversion: Exclude: - - 'app/helpers/application_helper.rb' - - 'app/models/article.rb' - - 'app/models/order.rb' - - 'lib/bank_account_information_importer.rb' - - 'plugins/wiki/app/controllers/pages_controller.rb' - - 'spec/api/v1/user/ordergroup_spec.rb' + - "app/helpers/application_helper.rb" + - "app/models/article.rb" + - "app/models/order.rb" + - "plugins/wiki/app/controllers/pages_controller.rb" + - "spec/api/v1/user/ordergroup_spec.rb" # Offense count: 8 # Configuration parameters: MinBranchesCount. Style/HashLikeCase: Exclude: - - 'app/controllers/articles_controller.rb' - - 'app/controllers/finance/bank_transactions_controller.rb' - - 'app/controllers/finance/financial_transactions_controller.rb' - - 'app/controllers/home_controller.rb' - - 'app/controllers/orders_controller.rb' - - 'app/helpers/finance/balancing_helper.rb' - - 'plugins/documents/app/controllers/documents_controller.rb' - - 'plugins/wiki/app/controllers/pages_controller.rb' + - "app/controllers/articles_controller.rb" + - "app/controllers/finance/bank_transactions_controller.rb" + - "app/controllers/finance/financial_transactions_controller.rb" + - "app/controllers/home_controller.rb" + - "app/controllers/orders_controller.rb" + - "app/helpers/finance/balancing_helper.rb" + - "plugins/documents/app/controllers/documents_controller.rb" + - "plugins/wiki/app/controllers/pages_controller.rb" # Offense count: 3904 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys -# SupportedShorthandSyntax: always, never, either +# SupportedShorthandSyntax: always, never, either, consistent Style/HashSyntax: Enabled: false # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowIfModifier. Style/IfInsideElse: Exclude: - - 'app/models/article.rb' - - 'app/models/task.rb' - - 'lib/apple_bar.rb' - - 'plugins/wiki/app/controllers/pages_controller.rb' + - "app/models/article.rb" + - "app/models/task.rb" + - "lib/apple_bar.rb" + - "plugins/wiki/app/controllers/pages_controller.rb" -# Offense count: 60 -# Cop supports --auto-correct. +# Offense count: 61 +# This cop supports safe autocorrection (--autocorrect). Style/IfUnlessModifier: Enabled: false # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: AllowedMethods. # AllowedMethods: nonzero? Style/IfWithBooleanLiteralBranches: Exclude: - - 'app/models/order_article.rb' - - 'app/models/task.rb' + - "app/models/order_article.rb" + - "app/models/task.rb" # Offense count: 1 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). Style/InfiniteLoop: Exclude: - - 'lib/order_pdf.rb' + - "lib/order_pdf.rb" # Offense count: 3 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: InverseMethods, InverseBlocks. Style/InverseMethods: Exclude: - - 'app/helpers/application_helper.rb' - - 'app/helpers/deliveries_helper.rb' - - 'spec/support/coverage.rb' + - "app/helpers/application_helper.rb" + - "app/helpers/deliveries_helper.rb" + - "spec/support/coverage.rb" # Offense count: 4 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: line_count_dependent, lambda, literal Style/Lambda: Exclude: - - 'app/models/financial_link.rb' - - 'lib/foodsoft_mail_receiver.rb' - - 'plugins/messages/app/models/message.rb' + - "app/models/financial_link.rb" + - "lib/foodsoft_mail_receiver.rb" + - "plugins/messages/app/models/message.rb" # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). Style/LineEndConcatenation: Exclude: - - 'db/migrate/20130702113610_update_group_order_totals.rb' - - 'plugins/current_orders/app/documents/multiple_orders_by_articles.rb' + - "db/migrate/20130702113610_update_group_order_totals.rb" + - "plugins/current_orders/app/documents/multiple_orders_by_articles.rb" # Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: IgnoredMethods. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods. Style/MethodCallWithoutArgsParentheses: Exclude: - - 'plugins/discourse/app/controllers/discourse_login_controller.rb' + - "plugins/discourse/app/controllers/discourse_login_controller.rb" # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline Style/MethodDefParentheses: Exclude: - - 'app/controllers/concerns/send_order_pdf.rb' - - 'app/helpers/application_helper.rb' - - 'app/helpers/finance/invoices_helper.rb' - - 'plugins/discourse/app/controllers/discourse_controller.rb' + - "app/controllers/concerns/send_order_pdf.rb" + - "app/helpers/application_helper.rb" + - "app/helpers/finance/invoices_helper.rb" + - "plugins/discourse/app/controllers/discourse_controller.rb" # Offense count: 1 Style/MixinUsage: Exclude: - - 'lib/tasks/foodsoft_setup.rake' + - "lib/tasks/foodsoft_setup.rake" -# Offense count: 2 +# Offense count: 3 Style/MultilineBlockChain: Exclude: - - 'app/helpers/group_orders_helper.rb' - - 'app/models/order.rb' - - 'config/initializers/rails6_backports.rb' + - "app/helpers/group_orders_helper.rb" + - "app/models/order.rb" + - "config/initializers/rails6_backports.rb" # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/MultilineIfModifier: Exclude: - - 'app/models/user.rb' - - 'plugins/current_orders/app/controllers/current_orders/ordergroups_controller.rb' + - "app/models/user.rb" + - "plugins/current_orders/app/controllers/current_orders/ordergroups_controller.rb" -# Offense count: 2 -# Cop supports --auto-correct. +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). Style/MultilineIfThen: Exclude: - - 'app/controllers/finance/financial_links_controller.rb' - - 'lib/bank_account_information_importer.rb' + - "app/controllers/finance/financial_links_controller.rb" # Offense count: 12 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/MultilineWhenThen: Exclude: - - 'app/controllers/finance/balancing_controller.rb' - - 'app/helpers/application_helper.rb' - - 'app/helpers/finance/balancing_helper.rb' - - 'app/models/order.rb' + - "app/controllers/finance/balancing_controller.rb" + - "app/helpers/application_helper.rb" + - "app/helpers/finance/balancing_helper.rb" + - "app/models/order.rb" # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowMethodComparison. Style/MultipleComparison: Exclude: - - 'app/models/order.rb' - - 'app/models/order_article.rb' - - 'spec/models/article_spec.rb' + - "app/models/order.rb" + - "app/models/order_article.rb" + - "spec/models/article_spec.rb" # Offense count: 24 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: literals, strict Style/MutableConstant: Enabled: false # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: both, prefix, postfix Style/NegatedIf: Exclude: - - 'app/controllers/orders_controller.rb' - - 'app/helpers/articles_helper.rb' + - "app/controllers/orders_controller.rb" + - "app/helpers/articles_helper.rb" # Offense count: 4 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/NegatedIfElseCondition: Exclude: - - 'app/controllers/articles_controller.rb' - - 'app/controllers/concerns/auth.rb' - - 'app/models/article.rb' + - "app/controllers/articles_controller.rb" + - "app/controllers/concerns/auth.rb" + - "app/models/article.rb" # Offense count: 8 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowedMethods. # AllowedMethods: 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/models/user.rb' - - 'spec/models/order_article_spec.rb' + - "app/models/user.rb" + - "spec/models/order_article_spec.rb" # Offense count: 7 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, MinBodyLength. # SupportedStyles: skip_modifier_ifs, always Style/Next: Exclude: - - 'app/controllers/finance/financial_transactions_controller.rb' - - 'app/controllers/orders_controller.rb' - - 'app/helpers/orders_helper.rb' - - 'db/migrate/20130622095040_move_weekly_tasks.rb' - - 'lib/tasks/foodsoft.rake' + - "app/controllers/finance/financial_transactions_controller.rb" + - "app/controllers/orders_controller.rb" + - "app/helpers/orders_helper.rb" + - "db/migrate/20130622095040_move_weekly_tasks.rb" + - "lib/tasks/foodsoft.rake" # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: predicate, comparison Style/NilComparison: Exclude: - - 'app/controllers/application_controller.rb' - - 'plugins/wiki/app/helpers/pages_helper.rb' + - "app/controllers/application_controller.rb" + - "plugins/wiki/app/helpers/pages_helper.rb" # Offense count: 10 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/Not: Exclude: - - 'app/controllers/concerns/auth.rb' - - 'app/controllers/orders_controller.rb' - - 'app/helpers/deliveries_helper.rb' - - 'app/models/group_order_article.rb' - - 'app/models/order_article.rb' - - 'app/models/supplier.rb' - - 'app/models/task.rb' - - 'spec/support/coverage.rb' + - "app/controllers/concerns/auth.rb" + - "app/controllers/orders_controller.rb" + - "app/helpers/deliveries_helper.rb" + - "app/models/group_order_article.rb" + - "app/models/order_article.rb" + - "app/models/supplier.rb" + - "app/models/task.rb" + - "spec/support/coverage.rb" # Offense count: 6 -# Cop supports --auto-correct. -# Configuration parameters: Strict, AllowedNumbers. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Strict, AllowedNumbers, AllowedPatterns. Style/NumericLiterals: MinDigits: 7 -# Offense count: 60 -# Cop supports --auto-correct-all. -# Configuration parameters: EnforcedStyle, IgnoredMethods. +# Offense count: 61 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns, IgnoredMethods. # SupportedStyles: predicate, comparison Style/NumericPredicate: Enabled: false @@ -1477,393 +1476,386 @@ Style/NumericPredicate: # AllowedMethods: respond_to_missing? Style/OptionalBooleanParameter: Exclude: - - 'app/helpers/application_helper.rb' - - 'app/helpers/orders_helper.rb' - - 'app/models/order_article.rb' - - 'lib/tasks/foodsoft_setup.rake' + - "app/helpers/application_helper.rb" + - "app/helpers/orders_helper.rb" + - "app/models/order_article.rb" + - "lib/tasks/foodsoft_setup.rake" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/OrAssignment: Exclude: - - 'app/controllers/articles_controller.rb' + - "app/controllers/articles_controller.rb" # Offense count: 8 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/ParallelAssignment: Exclude: - - 'app/models/article.rb' - - 'app/models/group_order_article.rb' - - 'app/models/supplier.rb' - - 'app/models/user.rb' - - 'spec/models/group_order_article_spec.rb' - - 'spec/support/session_helper.rb' + - "app/models/article.rb" + - "app/models/group_order_article.rb" + - "app/models/supplier.rb" + - "app/models/user.rb" + - "spec/models/group_order_article_spec.rb" + - "spec/support/session_helper.rb" # Offense count: 12 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions. Style/ParenthesesAroundCondition: Exclude: - - 'app/controllers/login_controller.rb' - - 'app/helpers/application_helper.rb' - - 'app/helpers/group_orders_helper.rb' - - 'app/models/group_order_article.rb' - - 'plugins/wiki/app/controllers/pages_controller.rb' + - "app/controllers/login_controller.rb" + - "app/helpers/application_helper.rb" + - "app/helpers/group_orders_helper.rb" + - "app/models/group_order_article.rb" + - "plugins/wiki/app/controllers/pages_controller.rb" # Offense count: 41 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: PreferredDelimiters. Style/PercentLiteralDelimiters: Enabled: false # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/PerlBackrefs: Exclude: - - 'lib/foodsoft/expansion_variables.rb' - - 'plugins/wiki/app/helpers/pages_helper.rb' + - "lib/foodsoft/expansion_variables.rb" + - "plugins/wiki/app/helpers/pages_helper.rb" # Offense count: 2 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: short, verbose Style/PreferredHashMethods: Exclude: - - 'app/helpers/admin/configs_helper.rb' - - 'app/helpers/articles_helper.rb' + - "app/helpers/admin/configs_helper.rb" + - "app/helpers/articles_helper.rb" # Offense count: 14 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/Proc: Exclude: - - 'app/helpers/deliveries_helper.rb' - - 'app/models/user.rb' - - 'config/navigation.rb' - - 'plugins/current_orders/lib/foodsoft_current_orders/engine.rb' - - 'plugins/links/lib/foodsoft_links/engine.rb' + - "app/helpers/deliveries_helper.rb" + - "app/models/user.rb" + - "config/navigation.rb" + - "plugins/current_orders/lib/foodsoft_current_orders/engine.rb" + - "plugins/links/lib/foodsoft_links/engine.rb" # Offense count: 6 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, AllowedCompactTypes. # SupportedStyles: compact, exploded Style/RaiseArgs: Exclude: - - 'app/controllers/api/v1/base_controller.rb' - - 'app/controllers/concerns/auth_api.rb' - - 'app/controllers/concerns/foodcoop_scope.rb' + - "app/controllers/api/v1/base_controller.rb" + - "app/controllers/concerns/auth_api.rb" + - "app/controllers/concerns/foodcoop_scope.rb" # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/RandomWithOffset: Exclude: - - 'db/migrate/007_create_article_prices.rb' - - 'db/migrate/008_create_orders.rb' - - 'db/seeds/seed_helper.rb' + - "db/migrate/007_create_article_prices.rb" + - "db/migrate/008_create_orders.rb" + - "db/seeds/seed_helper.rb" # Offense count: 1 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Methods. Style/RedundantArgument: Exclude: - - 'app/controllers/articles_controller.rb' + - "app/controllers/articles_controller.rb" # Offense count: 8 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/RedundantBegin: Exclude: - - 'app/controllers/articles_controller.rb' - - 'app/models/order.rb' - - 'lib/foodsoft_mail_receiver.rb' - - 'lib/tasks/multicoops.rake' - - 'spec/lib/foodsoft_mail_receiver_spec.rb' + - "app/controllers/articles_controller.rb" + - "app/models/order.rb" + - "lib/foodsoft_mail_receiver.rb" + - "lib/tasks/multicoops.rake" + - "spec/lib/foodsoft_mail_receiver_spec.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/RedundantConditional: Exclude: - - 'app/models/task.rb' + - "app/models/task.rb" # Offense count: 3 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: SafeForConstants. Style/RedundantFetchBlock: Exclude: - - 'config/puma.rb' + - "config/puma.rb" # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/RedundantFileExtensionInRequire: Exclude: - - 'db/seeds/small.en.seeds.rb' - - 'db/seeds/small.nl.seeds.rb' + - "db/seeds/small.en.seeds.rb" + - "db/seeds/small.nl.seeds.rb" # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). Style/RedundantInterpolation: Exclude: - - 'db/migrate/20130718183101_migrate_user_settings.rb' - - 'lib/order_pdf.rb' - - 'spec/i18n_spec.rb' - - 'spec/models/user_spec.rb' + - "db/migrate/20130718183101_migrate_user_settings.rb" + - "lib/order_pdf.rb" + - "spec/i18n_spec.rb" + - "spec/models/user_spec.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/RedundantRegexpCharacterClass: Exclude: - - 'plugins/wiki/app/helpers/pages_helper.rb' + - "plugins/wiki/app/helpers/pages_helper.rb" # Offense count: 7 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/RedundantRegexpEscape: Exclude: - - 'lib/bank_transaction_reference.rb' - - 'lib/foodsoft_mail_receiver.rb' - - 'plugins/documents/app/controllers/documents_controller.rb' - - 'plugins/wiki/app/models/page.rb' + - "lib/bank_transaction_reference.rb" + - "lib/foodsoft_mail_receiver.rb" + - "plugins/documents/app/controllers/documents_controller.rb" + - "plugins/wiki/app/models/page.rb" # Offense count: 15 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowMultipleReturnValues. Style/RedundantReturn: Exclude: - - 'app/controllers/concerns/auth_api.rb' - - 'app/helpers/application_helper.rb' - - 'app/helpers/deliveries_helper.rb' - - 'app/helpers/group_orders_helper.rb' - - 'app/helpers/orders_helper.rb' - - 'app/models/article.rb' - - 'app/models/bank_transaction.rb' - - 'app/models/periodic_task_group.rb' - - 'app/models/supplier.rb' - - 'lib/bank_transaction_reference.rb' + - "app/controllers/concerns/auth_api.rb" + - "app/helpers/application_helper.rb" + - "app/helpers/deliveries_helper.rb" + - "app/helpers/group_orders_helper.rb" + - "app/helpers/orders_helper.rb" + - "app/models/article.rb" + - "app/models/bank_transaction.rb" + - "app/models/periodic_task_group.rb" + - "app/models/supplier.rb" + - "lib/bank_transaction_reference.rb" -# Offense count: 82 -# Cop supports --auto-correct. +# Offense count: 83 +# This cop supports safe autocorrection (--autocorrect). Style/RedundantSelf: Enabled: false # Offense count: 1 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). Style/RedundantSort: Exclude: - - 'app/models/article_category.rb' + - "app/models/article_category.rb" # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, AllowInnerSlashes. # SupportedStyles: slashes, percent_r, mixed Style/RegexpLiteral: Exclude: - - 'plugins/wiki/app/models/page.rb' - - 'spec/support/coverage.rb' + - "plugins/wiki/app/models/page.rb" + - "spec/support/coverage.rb" # Offense count: 16 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/RescueModifier: Exclude: - - 'app/controllers/invites_controller.rb' - - 'app/models/article.rb' - - 'app/models/order.rb' - - 'app/models/ordergroup.rb' - - 'config/application.rb' - - 'lib/apple_bar.rb' - - 'lib/date_time_attribute_validate.rb' - - 'lib/foodsoft_date_util.rb' - - 'plugins/messages/app/models/message.rb' + - "app/controllers/invites_controller.rb" + - "app/models/article.rb" + - "app/models/order.rb" + - "app/models/ordergroup.rb" + - "config/application.rb" + - "lib/apple_bar.rb" + - "lib/date_time_attribute_validate.rb" + - "lib/foodsoft_date_util.rb" + - "plugins/messages/app/models/message.rb" -# Offense count: 50 -# Cop supports --auto-correct. +# Offense count: 51 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: implicit, explicit Style/RescueStandardError: Enabled: false # Offense count: 9 -# Cop supports --auto-correct. -# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods. +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength. # AllowedMethods: present?, blank?, presence, try, try! Style/SafeNavigation: Exclude: - - 'app/controllers/concerns/auth_api.rb' - - 'app/controllers/group_order_articles_controller.rb' - - 'app/models/article_category.rb' - - 'app/models/financial_transaction.rb' - - 'app/models/ordergroup.rb' - - 'app/models/user.rb' - - 'plugins/printer/app/controllers/printer_controller.rb' - - 'spec/factories/order.rb' + - "app/controllers/concerns/auth_api.rb" + - "app/controllers/group_order_articles_controller.rb" + - "app/models/article_category.rb" + - "app/models/financial_transaction.rb" + - "app/models/ordergroup.rb" + - "app/models/user.rb" + - "plugins/printer/app/controllers/printer_controller.rb" + - "spec/factories/order.rb" # Offense count: 1 -# Cop supports --auto-correct. -Style/SelectByRegexp: - Exclude: - - 'lib/foodsoft_config.rb' - -# Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/SelfAssignment: Exclude: - - 'app/helpers/application_helper.rb' + - "app/helpers/application_helper.rb" # Offense count: 16 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowAsExpressionSeparator. Style/Semicolon: Exclude: - - 'app/controllers/finance/bank_transactions_controller.rb' - - 'app/controllers/finance/financial_transactions_controller.rb' - - 'app/controllers/finance/invoices_controller.rb' - - 'app/controllers/orders_controller.rb' - - 'app/helpers/group_orders_helper.rb' - - 'db/migrate/20090120184410_road_to_version_three.rb' - - 'spec/api/v1/swagger_spec.rb' - - 'spec/api/v1/user/group_order_articles_spec.rb' - - 'spec/api/v1/user/ordergroup_spec.rb' - - 'spec/models/order_article_spec.rb' + - "app/controllers/finance/bank_transactions_controller.rb" + - "app/controllers/finance/financial_transactions_controller.rb" + - "app/controllers/finance/invoices_controller.rb" + - "app/controllers/orders_controller.rb" + - "app/helpers/group_orders_helper.rb" + - "db/migrate/20090120184410_road_to_version_three.rb" + - "spec/api/v1/swagger_spec.rb" + - "spec/api/v1/user/group_order_articles_spec.rb" + - "spec/api/v1/user/ordergroup_spec.rb" + - "spec/models/order_article_spec.rb" # Offense count: 5 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). Style/SlicingWithRange: Exclude: - - 'app/helpers/admin/configs_helper.rb' - - 'config/initializers/session_store.rb' - - 'lib/order_pdf.rb' + - "app/helpers/admin/configs_helper.rb" + - "config/initializers/session_store.rb" + - "lib/order_pdf.rb" # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowModifier. Style/SoleNestedConditional: Exclude: - - 'app/controllers/articles_controller.rb' - - 'app/controllers/concerns/auth.rb' + - "app/controllers/articles_controller.rb" + - "app/controllers/concerns/auth.rb" # Offense count: 9 -# Cop supports --auto-correct. +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: RequireEnglish. -# SupportedStyles: use_perl_names, use_english_names +# SupportedStyles: use_perl_names, use_english_names, use_builtin_english_names Style/SpecialGlobalVars: EnforcedStyle: use_perl_names -# Offense count: 32 -# Cop supports --auto-correct-all. +# Offense count: 33 +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Mode. Style/StringConcatenation: Enabled: false -# Offense count: 1799 -# Cop supports --auto-correct. +# Offense count: 1855 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. # SupportedStyles: single_quotes, double_quotes Style/StringLiterals: Enabled: false # Offense count: 80 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: MinSize. # SupportedStyles: percent, brackets Style/SymbolArray: EnforcedStyle: brackets # Offense count: 19 -# Cop supports --auto-correct-all. -# Configuration parameters: AllowMethodsWithArguments, IgnoredMethods. -# IgnoredMethods: respond_to, define_method +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, IgnoredMethods, AllowComments. +# AllowedMethods: respond_to, define_method Style/SymbolProc: Exclude: - - 'app/controllers/pickups_controller.rb' - - 'app/helpers/orders_helper.rb' - - 'app/models/delivery.rb' - - 'app/models/financial_transaction_class.rb' - - 'app/models/financial_transaction_type.rb' - - 'app/models/group_order_article.rb' - - 'app/models/order.rb' - - 'app/models/order_article.rb' - - 'app/models/stock_article.rb' - - 'app/models/user.rb' - - 'db/migrate/20090731132547_add_stats_to_groups.rb' - - 'spec/factories/order.rb' + - "app/controllers/pickups_controller.rb" + - "app/helpers/orders_helper.rb" + - "app/models/delivery.rb" + - "app/models/financial_transaction_class.rb" + - "app/models/financial_transaction_type.rb" + - "app/models/group_order_article.rb" + - "app/models/order.rb" + - "app/models/order_article.rb" + - "app/models/stock_article.rb" + - "app/models/user.rb" + - "db/migrate/20090731132547_add_stats_to_groups.rb" + - "spec/factories/order.rb" # Offense count: 4 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, AllowSafeAssignment. # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex Style/TernaryParentheses: Exclude: - - 'app/models/order_article.rb' + - "app/models/order_article.rb" # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyleForMultiline. # SupportedStylesForMultiline: comma, consistent_comma, no_comma Style/TrailingCommaInArrayLiteral: Exclude: - - 'lib/articles_csv.rb' - - 'lib/invoices_csv.rb' - - 'lib/ordergroups_csv.rb' + - "lib/articles_csv.rb" + - "lib/invoices_csv.rb" + - "lib/ordergroups_csv.rb" -# Offense count: 3 -# Cop supports --auto-correct. +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyleForMultiline. # SupportedStylesForMultiline: comma, consistent_comma, no_comma Style/TrailingCommaInHashLiteral: Exclude: - - 'app/controllers/finance/financial_transactions_controller.rb' - - 'config/initializers/exception_notification.rb' - - 'lib/bank_account_information_importer.rb' + - "app/controllers/finance/financial_transactions_controller.rb" + - "config/initializers/exception_notification.rb" # Offense count: 8 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, AllowedMethods. # AllowedMethods: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym Style/TrivialAccessors: Exclude: - - 'app/models/order.rb' - - 'lib/bank_account_connector.rb' - - 'plugins/messages/app/models/message.rb' + - "app/models/order.rb" + - "lib/bank_account_connector.rb" + - "plugins/messages/app/models/message.rb" # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/UnlessElse: Exclude: - - 'app/controllers/home_controller.rb' - - 'app/controllers/orders_controller.rb' - - 'app/helpers/group_order_articles_helper.rb' - - 'plugins/current_orders/app/controllers/current_orders/articles_controller.rb' - - 'plugins/wiki/app/helpers/pages_helper.rb' + - "app/controllers/home_controller.rb" + - "app/controllers/orders_controller.rb" + - "app/helpers/group_order_articles_helper.rb" + - "plugins/current_orders/app/controllers/current_orders/articles_controller.rb" + - "plugins/wiki/app/helpers/pages_helper.rb" # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). Style/WhileUntilModifier: Exclude: - - 'app/models/periodic_task_group.rb' + - "app/models/periodic_task_group.rb" # Offense count: 11 -# Cop supports --auto-correct. +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, MinSize, WordRegex. # SupportedStyles: percent, brackets Style/WordArray: Exclude: - - 'app/documents/order_matrix.rb' - - 'app/helpers/application_helper.rb' - - 'app/models/supplier.rb' - - 'db/migrate/006_create_articles.rb' - - 'lib/tasks/foodsoft_setup.rake' - - 'plugins/current_orders/app/controllers/current_orders/group_orders_controller.rb' - - 'plugins/wiki/app/controllers/pages_controller.rb' - - 'plugins/wiki/app/helpers/pages_helper.rb' - - 'spec/support/faker.rb' + - "app/documents/order_matrix.rb" + - "app/helpers/application_helper.rb" + - "app/models/supplier.rb" + - "db/migrate/006_create_articles.rb" + - "lib/tasks/foodsoft_setup.rake" + - "plugins/current_orders/app/controllers/current_orders/group_orders_controller.rb" + - "plugins/wiki/app/controllers/pages_controller.rb" + - "plugins/wiki/app/helpers/pages_helper.rb" + - "spec/support/faker.rb" # Offense count: 3 -# Cop supports --auto-correct-all. +# This cop supports unsafe autocorrection (--autocorrect-all). Style/ZeroLengthPredicate: Exclude: - - 'app/models/group_order_article.rb' - - 'plugins/current_orders/app/documents/multiple_orders_by_articles.rb' - - 'plugins/current_orders/app/documents/multiple_orders_by_groups.rb' + - "app/models/group_order_article.rb" + - "plugins/current_orders/app/documents/multiple_orders_by_articles.rb" + - "plugins/current_orders/app/documents/multiple_orders_by_groups.rb" -# Offense count: 448 -# Cop supports --auto-correct. -# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. +# Offense count: 446 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns. # URISchemes: http, https Layout/LineLength: Max: 420 diff --git a/Gemfile.lock b/Gemfile.lock index e75862a6..59638474 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -310,7 +310,7 @@ GEM mini_portile2 (~> 2.8.0) racc (~> 1.4) parallel (1.22.1) - parser (3.1.2.0) + parser (3.1.2.1) ast (~> 2.4.1) pdf-core (0.9.0) polyglot (0.3.5) @@ -433,23 +433,24 @@ GEM rspec-rerun (1.1.0) rspec (~> 3.0) rspec-support (3.11.0) - rubocop (1.30.0) + rubocop (1.36.0) + json (~> 2.3) parallel (~> 1.10) - parser (>= 3.1.0.0) + parser (>= 3.1.2.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.18.0, < 2.0) + rubocop-ast (>= 1.20.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.18.0) + rubocop-ast (1.21.0) parser (>= 3.1.1.0) - rubocop-rails (2.14.2) + rubocop-rails (2.16.1) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.7.0, < 2.0) - rubocop-rspec (2.11.1) - rubocop (~> 1.19) + rubocop (>= 1.33.0, < 2.0) + rubocop-rspec (2.13.2) + rubocop (~> 1.33) ruby-filemagic (0.7.3) ruby-ole (1.2.12.2) ruby-prof (1.4.3) diff --git a/config/application.rb b/config/application.rb index 38c9a6d4..08433d63 100644 --- a/config/application.rb +++ b/config/application.rb @@ -74,7 +74,7 @@ module Foodsoft end # Foodsoft version - VERSION = File.read(Rails.root.join('VERSION')).strip + VERSION = Rails.root.join('VERSION').read.strip # Current revision, or +nil+ - REVISION = (File.read(Rails.root.join('REVISION')).strip rescue nil) + REVISION = (Rails.root.join('REVISION').read.strip rescue nil) end diff --git a/lib/render_pdf.rb b/lib/render_pdf.rb index 00333f32..a5cde2b6 100644 --- a/lib/render_pdf.rb +++ b/lib/render_pdf.rb @@ -166,6 +166,6 @@ class RenderPDF < Prawn::Document end def font_path(name) - File.join(Rails.root, 'vendor', 'assets', 'fonts', name) + Rails.root.join('vendor', 'assets', 'fonts', name) end end diff --git a/lib/tasks/seeds.rake b/lib/tasks/seeds.rake index 2437befe..b370e254 100644 --- a/lib/tasks/seeds.rake +++ b/lib/tasks/seeds.rake @@ -6,7 +6,7 @@ require 'pathname' namespace :db do namespace :seed do - Dir.glob(Rails.root.join('db/seeds/*.seeds.rb')).sort.each do |seedfile| + Rails.root.glob('db/seeds/*.seeds.rb').sort.each do |seedfile| desc "Load the seed data from #{Pathname.new(seedfile).relative_path_from(Rails.root)}" task File.basename(seedfile, '.seeds.rb') => :environment do require_relative seedfile diff --git a/spec/api/v1/user/financial_transactions_spec.rb b/spec/api/v1/user/financial_transactions_spec.rb index b8cb37e6..c7e8f826 100644 --- a/spec/api/v1/user/financial_transactions_spec.rb +++ b/spec/api/v1/user/financial_transactions_spec.rb @@ -21,7 +21,7 @@ describe Api::V1::User::FinancialTransactionsController, type: :controller do before { request } it "returns status 200" do - expect(response.status).to eq 200 + expect(response).to have_http_status :ok end end diff --git a/spec/api/v1/user/group_order_articles_spec.rb b/spec/api/v1/user/group_order_articles_spec.rb index e6f08c17..3bfa299e 100644 --- a/spec/api/v1/user/group_order_articles_spec.rb +++ b/spec/api/v1/user/group_order_articles_spec.rb @@ -23,7 +23,7 @@ describe Api::V1::User::GroupOrderArticlesController, type: :controller do before { request } it "returns status 200" do - expect(response.status).to eq 200 + expect(response).to have_http_status :ok end it "returns the order_article" do diff --git a/spec/integration/balancing_spec.rb b/spec/integration/balancing_spec.rb index 2239d068..77fe0ec7 100644 --- a/spec/integration/balancing_spec.rb +++ b/spec/integration/balancing_spec.rb @@ -113,7 +113,7 @@ feature 'settling an order', js: true do click_link I18n.t('ui.edit') end within("#edit_order_article_#{oa.id}") do - find('#order_article_units_to_order').set(0) + find_by_id('order_article_units_to_order').set(0) sleep 0.25 find('input[type="submit"]').click end @@ -135,7 +135,7 @@ feature 'settling an order', js: true do expect(page).to have_selector('form#new_group_order_article') within('#new_group_order_article') do select user.ordergroup.name, :from => 'group_order_article_ordergroup_id' - find('#group_order_article_result').set(8) + find_by_id('group_order_article_result').set(8) sleep 0.25 find('input[type="submit"]').click end @@ -174,7 +174,7 @@ feature 'settling an order', js: true do click_link I18n.t('finance.balancing.edit_results_by_articles.add_article') expect(page).to have_selector('form#new_order_article') within('#new_order_article') do - find('#order_article_article_id').select(new_article.name) + find_by_id('order_article_article_id').select(new_article.name) sleep 0.25 find('input[type="submit"]').click end diff --git a/spec/lib/bank_account_information_importer_spec.rb b/spec/lib/bank_account_information_importer_spec.rb index 53b9cad3..40c3b1ea 100644 --- a/spec/lib/bank_account_information_importer_spec.rb +++ b/spec/lib/bank_account_information_importer_spec.rb @@ -4,8 +4,7 @@ describe BankTransaction do let(:bank_account) { create :bank_account } it 'empty content' do - content = <<-JSON - JSON + content = '' importer = BankAccountInformationImporter.new(bank_account) expect(importer.import!(content)).to be_nil