inherit_from: ../.rubocop.yml # Avoid parameter lists longer than five parameters. ParameterLists: Max: 3 CountKeywordArgs: true # Avoid more than `Max` levels of nesting. BlockNesting: Max: 3 # Align with the style guide. CollectionMethods: Enabled: true PreferredMethods: collect: 'map' inject: 'reduce' find: 'detect' find_all: 'select' AccessModifierIndentation: EnforcedStyle: outdent # Limit line length LineLength: Max: 120 # Disable documentation checking until a class needs to be documented once Documentation: Enabled: false # Do not always use &&/|| instead of and/or. AndOr: Enabled: false # Do not favor modifier if/unless usage when you have a single-line body IfUnlessModifier: Enabled: false # Allow case equality operator (in limited use within the specs) CaseEquality: Enabled: false # Constants do not always have to use SCREAMING_SNAKE_CASE ConstantName: Enabled: false # Not all trivial readers/writers can be defined with attr_* methods TrivialAccessors: Enabled: false # Allow empty lines around class body EmptyLinesAroundClassBody: Enabled: false # Allow empty lines around module body EmptyLinesAroundModuleBody: Enabled: false # Allow empty lines around block body EmptyLinesAroundBlockBody: Enabled: false # Allow multiple line operations to not require indentation MultilineOperationIndentation: Enabled: false # Prefer String#% over Kernel#sprintf FormatString: EnforcedStyle: percent # Use square brackets for literal Array objects PercentLiteralDelimiters: PreferredDelimiters: '%': '{}' '%i': '[]' '%q': () '%Q': () '%r': '{}' '%s': () '%w': '[]' '%W': '[]' '%x': () # Use %i[...] for arrays of symbols SymbolArray: Enabled: true # Align if/else blocks with the variable assignment EndAlignment: AlignWith: variable # Prefer #kind_of? over #is_a? ClassCheck: EnforcedStyle: kind_of? # Do not prefer double quotes to be used when %q or %Q is more appropriate UnneededPercentQ: Enabled: false # Allow a maximum ABC score Metrics/AbcSize: Max: 21.02 # Do not prefer lambda.call(...) over lambda.(...) LambdaCall: Enabled: false # Buggy cop, returns false positive for our code base NonLocalExitFromIterator: Enabled: false # To allow alignment of similar expressions we want to allow more than one # space around operators: # # let(:a) { bar + something } # let(:b) { foobar + something } # SpaceAroundOperators: Enabled: false # We use parallel assignments with great success ParallelAssignment: Enabled: false # Allow additional specs ExtraSpacing: AllowForAlignment: true # Buggy FormatParameterMismatch: Enabled: false # Different preference SignalException: EnforcedStyle: semantic # Do not use `alias` Alias: EnforcedStyle: prefer_alias_method # Teaching people to ignore singleton class is pointless RedundantFreeze: Enabled: false # Do not waste my horizontal or vertical space IndentArray: Enabled: false # Prefer # # some_receiver # .foo # .bar # .baz # # Over # # some_receiver.foo # .bar # .baz MultilineMethodCallIndentation: EnforcedStyle: indented # Align keys and values in a multiline hash Style/AlignHash: EnforcedColonStyle: table # Prefer `public_send` and `__send__` over `send` Send: Enabled: true