.ruby-style.yml
---
AllCops:
Exclude:
- vendor/**/*
- db/schema.rb
- tmp/**/*
UseCache: false
TargetRubyVersion: 2.3
Layout/DotPosition:
Enabled: true
EnforcedStyle: trailing
SupportedStyles:
- leading
- trailing
Lint/AssignmentInCondition:
Enabled: false
AllowSafeAssignment: true
Lint/EachWithObjectArgument:
Enabled: true
Lint/HandleExceptions:
Enabled: false
Lint/LiteralAsCondition:
Enabled: false
Lint/LiteralInInterpolation:
Enabled: false
Metrics/AbcSize:
Enabled: false
Max: 15
Metrics/BlockLength:
Exclude:
- Rakefile
- "**/*.rake"
- spec/**/*.rb
- config/routes.rb
ExcludedMethods:
- aasm
- class_methods
Metrics/ClassLength:
Enabled: false
CountComments: false
Max: 100
Metrics/CyclomaticComplexity:
Enabled: false
Max: 6
Metrics/LineLength:
Max: 140
AllowHeredoc: true
AllowURI: true
URISchemes:
- http
- https
Metrics/MethodLength:
Enabled: false
CountComments: false
Max: 10
Metrics/ModuleLength:
CountComments: false
Max: 100
Enabled: false
Metrics/ParameterLists:
Enabled: false
Max: 5
CountKeywordArgs: true
Metrics/PerceivedComplexity:
Enabled: false
Max: 7
Naming/AccessorMethodName:
Enabled: false
Naming/FileName:
Enabled: false
Exclude: []
Naming/PredicateName:
Enabled: true
NamePrefix:
- is_
- has_
- have_
NamePrefixBlacklist:
- is_
Exclude:
- spec/**/*
Naming/UncommunicativeMethodParamName:
MinNameLength: 3
AllowNamesEndingInNumbers: true
AllowedNames:
- io
- id
- to
- by
- 'on'
- in
- at
- '_'
ForbiddenNames: []
Style/Alias:
Enabled: false
Style/CollectionMethods:
Enabled: true
PreferredMethods:
collect: map
collect!: map!
find: detect
find_all: select
reduce: inject
Style/Documentation:
Enabled: false
Style/DoubleNegation:
Enabled: false
Style/EachWithObject:
Enabled: false
Style/EmptyLiteral:
Enabled: false
Style/GuardClause:
Enabled: false
MinBodyLength: 1
Style/IfUnlessModifier:
Enabled: false
Style/InlineComment:
Enabled: false
Style/MethodMissing:
Exclude:
- app/presenters/**/*
Style/ModuleFunction:
Enabled: false
Style/OneLineConditional:
Enabled: false
Style/OptionHash:
Enabled: false
Style/PercentLiteralDelimiters:
Enabled: false
PreferredDelimiters:
"%": "()"
"%i": "()"
"%q": "()"
"%Q": "()"
"%r": "{}"
"%s": "()"
"%w": "()"
"%W": "()"
"%x": "()"
Style/PerlBackrefs:
Enabled: false
Style/RaiseArgs:
Enabled: false
EnforcedStyle: exploded
SupportedStyles:
- compact
- exploded
Style/Send:
Enabled: false
Style/SignalException:
Enabled: false
EnforcedStyle: semantic
SupportedStyles:
- only_raise
- only_fail
- semantic
Style/SingleLineBlockParams:
Enabled: false
Methods:
- reduce:
- a
- e
- inject:
- a
- e
Style/SingleLineMethods:
Enabled: false
AllowIfMethodIsEmpty: true
Style/SpecialGlobalVars:
Enabled: false
Style/StringLiterals:
Enabled: true
EnforcedStyle: single_quotes
SupportedStyles:
- single_quotes
- double_quotes
Style/StringLiteralsInInterpolation:
Enabled: true
EnforcedStyle: single_quotes
SupportedStyles:
- single_quotes
- double_quotes
Style/TrailingCommaInArguments:
Enabled: false
EnforcedStyleForMultiline: no_comma
Style/VariableInterpolation:
Enabled: false
Style/WhenThen:
Enabled: false