122 lines
2.1 KiB
YAML
122 lines
2.1 KiB
YAML
##################
|
|
# General Rubocop Config
|
|
##################
|
|
|
|
Style/ClassCheck:
|
|
EnforcedStyle: kind_of?
|
|
|
|
# Cop supports --auto-correct.
|
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
Style/BracesAroundHashParameters:
|
|
Enabled: false
|
|
|
|
Lint/UselessAssignment:
|
|
Exclude:
|
|
- 'spec/**/*'
|
|
|
|
# Cop supports --auto-correct.
|
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
Style/IndentHash:
|
|
Enabled: false
|
|
|
|
Style/RaiseArgs:
|
|
EnforcedStyle: exploded
|
|
|
|
Style/DoubleNegation:
|
|
Enabled: false
|
|
|
|
Lint/HandleExceptions:
|
|
Enabled: false
|
|
|
|
# Cop supports --auto-correct.
|
|
Lint/UnusedBlockArgument:
|
|
Enabled: false
|
|
|
|
# Needed for $verbose
|
|
Style/GlobalVars:
|
|
Enabled: false
|
|
|
|
Style/FileName:
|
|
Enabled: false
|
|
|
|
# $? Exit
|
|
Style/SpecialGlobalVars:
|
|
Enabled: false
|
|
|
|
# the let(:key) { ... } should be allowed in tests
|
|
Lint/ParenthesesAsGroupedExpression:
|
|
Exclude:
|
|
- 'spec/**/*'
|
|
|
|
# Block length
|
|
Metrics/BlockLength:
|
|
Max: 200
|
|
|
|
# options.rb might be large, we know that
|
|
Metrics/MethodLength:
|
|
Max: 60
|
|
Exclude:
|
|
- 'lib/*/options.rb'
|
|
|
|
Metrics/AbcSize:
|
|
Max: 60
|
|
Exclude:
|
|
- 'lib/*/options.rb'
|
|
|
|
# Both string notations are okay
|
|
Style/StringLiterals:
|
|
Enabled: true
|
|
EnforcedStyle: double_quotes
|
|
|
|
# The %w might be confusing for new users
|
|
Style/WordArray:
|
|
MinSize: 19
|
|
|
|
# Not a good thing
|
|
Style/RedundantSelf:
|
|
Enabled: false
|
|
|
|
# raise and fail are both okay
|
|
Style/SignalException:
|
|
Enabled: false
|
|
|
|
# Better too much 'return' than one missing
|
|
Style/RedundantReturn:
|
|
Enabled: false
|
|
|
|
# Having if in the same line might not always be good
|
|
Style/IfUnlessModifier:
|
|
Enabled: false
|
|
|
|
# That looks wrong
|
|
Style/AlignHash:
|
|
Enabled: false
|
|
|
|
# and and or is okay
|
|
Style/AndOr:
|
|
Enabled: false
|
|
|
|
# Configuration parameters: CountComments.
|
|
Metrics/ClassLength:
|
|
Max: 320
|
|
|
|
Metrics/CyclomaticComplexity:
|
|
Max: 17
|
|
|
|
# Configuration parameters: AllowURI, URISchemes.
|
|
Metrics/LineLength:
|
|
Max: 370
|
|
|
|
# Configuration parameters: CountKeywordArgs.
|
|
Metrics/ParameterLists:
|
|
Max: 17
|
|
|
|
Metrics/PerceivedComplexity:
|
|
Max: 18
|
|
|
|
Style/DotPosition:
|
|
Enabled: false
|
|
|
|
Style/GuardClause:
|
|
Enabled: false
|