2019-06-03 13:55:27 +03:00
require :
- rubocop-performance
2019-12-19 10:28:27 +03:00
- rubocop-rails
2022-04-11 17:12:56 +03:00
- rubocop-minitest
2016-10-19 12:41:42 +03:00
2017-04-03 20:42:20 +03:00
AllCops :
2023-11-05 08:21:43 +03:00
TargetRubyVersion : 3.0
2022-09-13 20:00:43 +03:00
TargetRailsVersion : 6.1
2020-04-16 14:00:07 +03:00
NewCops : enable
2022-06-27 10:40:53 +03:00
ActiveSupportExtensionsEnabled : true
2017-10-15 10:33:55 +03:00
2022-04-11 17:12:56 +03:00
Rails :
Enabled : true
Minitest/MultipleAssertions :
Max : 15
Enabled : true
Minitest/AssertPredicate :
Enabled : false
2017-10-15 10:33:55 +03:00
Metrics/AbcSize :
2019-12-25 10:45:16 +03:00
Enabled : false
2017-10-15 10:33:55 +03:00
Metrics/BlockLength :
2019-12-25 10:45:16 +03:00
Enabled : false
2017-10-15 10:33:55 +03:00
2021-04-18 14:34:55 +03:00
Metrics/ParameterLists :
Enabled : true
CountKeywordArgs : false
2017-10-15 10:33:55 +03:00
Metrics/ClassLength :
2018-09-26 11:28:28 +03:00
Enabled : false
2017-10-15 10:33:55 +03:00
Metrics/CyclomaticComplexity :
2020-09-25 11:42:03 +03:00
Max : 25
2017-04-03 20:42:20 +03:00
2021-03-24 10:08:17 +03:00
Style/HashConversion :
Enabled : true
2019-12-19 10:28:27 +03:00
Layout/LineLength :
2015-10-09 19:20:04 +03:00
Max : 140
Metrics/MethodLength :
Max : 60
2017-10-15 10:33:55 +03:00
Metrics/ModuleLength :
2018-09-26 11:28:28 +03:00
Enabled : false
2015-12-06 14:48:33 +03:00
2015-10-09 19:20:04 +03:00
Metrics/PerceivedComplexity :
2018-11-17 10:18:46 +03:00
Max : 25
2015-10-09 19:20:04 +03:00
2019-12-19 10:28:27 +03:00
Rails/ApplicationJob :
Enabled : false
2021-09-14 20:58:08 +03:00
Lint/AmbiguousOperatorPrecedence :
Enabled : false
2019-12-19 10:28:27 +03:00
Rails/ApplicationRecord :
2015-10-10 15:11:02 +03:00
Enabled : false
2016-10-19 12:41:42 +03:00
2017-12-12 20:37:21 +03:00
Rails/CreateTableWithTimestamps :
Enabled : false
2019-12-19 10:28:27 +03:00
Rails/HelperInstanceVariable :
Enabled : false
Rails/SkipsModelValidations :
Enabled : false
2021-10-24 10:00:29 +03:00
Rails/Output :
Enabled : true
Exclude :
- 'db/migrate/*'
2019-04-09 18:47:08 +03:00
Performance/ChainArrayAllocation :
Enabled : true
2018-08-13 13:31:50 +03:00
2017-10-15 10:33:55 +03:00
Style/AutoResourceCleanup :
Enabled : true
2016-10-19 14:30:14 +03:00
2021-04-18 14:34:55 +03:00
Style/ExpandPathArguments :
Enabled : true
Exclude :
- additionals.gemspec
- test/**/*
2019-05-15 20:54:06 +03:00
Style/FrozenStringLiteralComment :
2021-04-18 14:34:55 +03:00
Enabled : true
Exclude :
- '/**/*.rsb'
2019-05-15 20:54:06 +03:00
2021-04-18 14:34:55 +03:00
Style/OptionHash :
Enabled : true
SuspiciousParamNames :
- options
- api_options
- opts
- args
- params
- parameters
- settings
Exclude :
- lib/additionals/patches/*.rb
2018-07-15 11:07:31 +03:00
2022-01-13 20:03:29 +03:00
# postgresql and mysql are supported
# autodetect does not work without database configuration
Rails/BulkChangeTable :
Enabled : true
Database : postgresql
2021-04-18 14:34:55 +03:00
Style/ReturnNil :
Enabled : true
Style/UnlessLogicalOperators :
Enabled : true
Style/MethodCallWithArgsParentheses :
Enabled : true
AllowParenthesesInMultilineCall : true
AllowParenthesesInChaining : true
EnforcedStyle : omit_parentheses
2023-12-11 14:49:42 +03:00
Style/SuperWithArgsParentheses :
Enabled : false
2021-04-18 14:34:55 +03:00
Style/Documentation :
2018-07-15 11:07:31 +03:00
Enabled : false
2020-03-09 16:51:54 +03:00
2020-11-05 16:39:35 +03:00
Naming/VariableNumber :
2020-12-25 15:31:19 +03:00
Enabled : true
Exclude :
- 'test/**/*'
2020-12-01 14:01:34 +03:00
Style/StringConcatenation :
Exclude :
- 'app/views/additionals/_select2_ajax_call.*'
2021-12-26 10:17:22 +03:00
2022-06-27 10:08:53 +03:00
Layout/LineContinuationLeadingSpace :
Enabled : false
2021-12-26 10:17:22 +03:00
# see https://github.com/rubocop/rubocop-rails/issues/578
# redmine does not use load_defaults: https://rails.rubystyle.guide/#config-defaults
Rails/RedundantPresenceValidationOnBelongsTo :
Enabled : false
2023-08-09 11:35:24 +03:00
Bundler/DuplicatedGroup :
Enabled : false