additionals/.rubocop.yml
2021-12-26 08:17:22 +01:00

128 lines
2.0 KiB
YAML

require:
- rubocop-performance
- rubocop-rails
Rails:
Enabled: true
AllCops:
TargetRubyVersion: 2.6
TargetRailsVersion: 5.2
NewCops: enable
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/ParameterLists:
Enabled: true
CountKeywordArgs: false
Metrics/ClassLength:
Enabled: false
Metrics/CyclomaticComplexity:
Max: 25
Style/HashConversion:
Enabled: true
Layout/LineLength:
Max: 140
Metrics/MethodLength:
Max: 60
Metrics/ModuleLength:
Enabled: false
Metrics/PerceivedComplexity:
Max: 25
Rails/ApplicationJob:
Enabled: false
Lint/AmbiguousOperatorPrecedence:
Enabled: false
Rails/ApplicationRecord:
Enabled: false
Rails/CreateTableWithTimestamps:
Enabled: false
Rails/HelperInstanceVariable:
Enabled: false
Rails/SkipsModelValidations:
Enabled: false
Rails/Output:
Enabled: true
Exclude:
- 'db/migrate/*'
Performance/ChainArrayAllocation:
Enabled: true
Style/AutoResourceCleanup:
Enabled: true
Style/ExpandPathArguments:
Enabled: true
Exclude:
- additionals.gemspec
- test/**/*
Style/FrozenStringLiteralComment:
Enabled: true
Exclude:
- '/**/*.rsb'
Style/OptionHash:
Enabled: true
SuspiciousParamNames:
- options
- api_options
- opts
- args
- params
- parameters
- settings
Exclude:
- lib/additionals/patches/*.rb
Style/ReturnNil:
Enabled: true
Style/UnlessLogicalOperators:
Enabled: true
Style/MethodCallWithArgsParentheses:
Enabled: true
AllowParenthesesInMultilineCall: true
AllowParenthesesInChaining: true
EnforcedStyle: omit_parentheses
Style/Documentation:
Enabled: false
Style/HashTransformValues:
Enabled: false
Naming/VariableNumber:
Enabled: true
Exclude:
- 'test/**/*'
Style/StringConcatenation:
Exclude:
- 'app/views/additionals/_select2_ajax_call.*'
# 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