require: ezcater_rubocop

AllCops:
  DisplayCopNames: true
  NewCops: disable
  SuggestExtensions: false

Layout/FirstHashElementIndentation:
  EnforcedStyle: consistent

Layout/FirstArrayElementIndentation:
  EnforcedStyle: consistent

Layout/MultilineMethodCallIndentation:
  EnforcedStyle: indented

Layout/DotPosition:
  EnforcedStyle: trailing

Metrics/AbcSize:
  Enabled: false

Metrics/BlockLength:
  Exclude:
    - "*.gemspec"
    - "/**/spec/**/*.rb"

Metrics/CyclomaticComplexity:
  Enabled: false

Layout/LineLength:
  Max: 120
  Exclude:
    - "Gemfile"

Metrics/MethodLength:
  Enabled: true
  CountComments: false
  Max: 25

Metrics/PerceivedComplexity:
  Enabled: false

Naming/MemoizedInstanceVariableName:
  EnforcedStyleForLeadingUnderscores: required

Naming/MethodParameterName:
  AllowedNames:
    - e
    - ex
    - id

Naming/VariableNumber:
  Enabled: false

Rails:
  Enabled: false

RSpec/ContextWording:
  Enabled: false

RSpec/DescribeClass:
  Exclude:
    - "/**/spec/features/**/*.rb"
    - "/**/spec/requests/**/*.rb"
    - "/**/spec/routing/**/*.rb"
    - "/**/spec/views/**/*.rb"
    - "/**/spec/system/**/*.rb"
    - "/**/spec/integrations/**/*.rb"

RSpec/ExampleLength:
  Max: 25

RSpec/LetSetup:
  Enabled: false

RSpec/MessageExpectation:
  Enabled: true
  EnforcedStyle: allow

RSpec/MultipleExpectations:
  Max: 5

RSpec/NestedGroups:
  Max: 5

# From rubocop-rspec
Rails/HttpStatus:
  Enabled: true
  EnforcedStyle: symbolic

Style/EmptyLiteral:
  Enabled: false

Style/FrozenStringLiteralComment:
  Enabled: true
  EnforcedStyle: always

Style/GuardClause:
  Enabled: false

Style/Documentation:
  Enabled: false

Style/IfUnlessModifier:
  Enabled: false

Style/NegatedIf:
  Enabled: false

# This cop does not yet support a style to prevent underscores
Style/NumericLiterals:
  Enabled: false

Style/PercentLiteralDelimiters:
  PreferredDelimiters:
    default: "()"
    "%i": "()"
    "%I": "()"
    "%r": "{}"
    "%w": "()"
    "%W": "()"

Style/RaiseArgs:
  EnforcedStyle: compact

Style/RegexpLiteral:
  Enabled: true
  EnforcedStyle: slashes
  AllowInnerSlashes: true

Style/SingleLineBlockParams:
  Enabled: false

Style/StderrPuts:
  Exclude:
    - "bin/yarn"

Style/StringConcatenation:
  Enabled: false

Style/StringLiterals:
  EnforcedStyle: double_quotes

Style/TrailingCommaInArrayLiteral:
  EnforcedStyleForMultiline: consistent_comma

Style/TrailingCommaInHashLiteral:
  EnforcedStyleForMultiline: consistent_comma


Layout/BeginEndAlignment:
  Enabled: true

Layout/EmptyLinesAroundAttributeAccessor:
  Enabled: true

Layout/IndentationStyle:
  Enabled: true

Layout/SpaceAroundMethodCallOperator:
  Enabled: true

Lint/BinaryOperatorWithIdenticalOperands:
  Enabled: true

Lint/ConstantDefinitionInBlock:
  Enabled: true

Lint/DeprecatedOpenSSLConstant:
  Enabled: true

Lint/DuplicateElsifCondition:
  Enabled: true

Lint/DuplicateRequire:
  Enabled: true

Lint/DuplicateRescueException:
  Enabled: true

Lint/EmptyConditionalBody:
  Enabled: true

Lint/EmptyFile:
  Enabled: true

Lint/FloatComparison:
  Enabled: true

Lint/HashCompareByIdentity:
  Enabled: true

Lint/IdentityComparison:
  Enabled: true

Lint/MissingSuper:
  Enabled: true

Lint/MixedRegexpCaptureTypes:
  Enabled: true

Lint/OutOfRangeRegexpRef:
  Enabled: true

Lint/RedundantSafeNavigation:
  Enabled: true

Lint/SelfAssignment:
  Enabled: true

Lint/TopLevelReturnWithArgument:
  Enabled: true

Lint/TrailingCommaInAttributeDeclaration:
  Enabled: true

Lint/UnreachableLoop:
  Enabled: true

Lint/UselessMethodDefinition:
  Enabled: true

Lint/UselessTimes:
  Enabled: true

Rails/ArelStar:
  Enabled: true

Rails/Pick:
  Enabled: true

Rails/RedundantForeignKey:
  Enabled: true

Capybara/CurrentPathExpectation:
  Enabled: true

Capybara/VisibilityMatcher:
  Enabled: true

RSpec/Capybara/FeatureMethods:
  Enabled: true

RSpec/EmptyHook:
  Enabled: true

RSpec/FactoryBot/AttributeDefinedStatically:
  Enabled: true

RSpec/FactoryBot/CreateList:
  Enabled: true

RSpec/FactoryBot/FactoryClassName:
  Enabled: true

RSpec/MultipleMemoizedHelpers:
  Enabled: true

RSpec/NotToNot:
  Enabled: true

RSpec/Rails/HttpStatus:
  Enabled: true

RSpec/RepeatedIncludeExample:
  Enabled: true

RSpec/StubbedMock:
  Enabled: true

RSpec/VariableDefinition:
  Enabled: true

RSpec/VariableName:
  Enabled: true

Style/AccessorGrouping:
  Enabled: true

Style/BisectedAttrAccessor:
  Enabled: true

Style/CaseLikeIf:
  Enabled: true

Style/CombinableLoops:
  Enabled: true

Style/ExponentialNotation:
  Enabled: true

Style/GlobalStdStream:
  Enabled: true

Style/HashAsLastArrayItem:
  Enabled: true

Style/HashLikeCase:
  Enabled: true

Style/KeywordParametersOrder:
  Enabled: true

Style/OptionalBooleanParameter:
  Enabled: true

Style/RedundantAssignment:
  Enabled: true

Style/RedundantRegexpCharacterClass:
  Enabled: true

Style/RedundantRegexpEscape:
  Enabled: true

Style/RedundantSelfAssignment:
  Enabled: true

Style/SingleArgumentDig:
  Enabled: true

Style/SlicingWithRange:
  Enabled: true

Style/SoleNestedConditional:
  Enabled: true

Lint/RaiseException:
  Enabled: true

Lint/StructNewOverride:
  Enabled: true

Style/HashEachMethods:
  Enabled: true

Style/HashTransformKeys:
  Enabled: true

Style/HashTransformValues:
  Enabled: true

Style/HashSyntax:
  EnforcedShorthandSyntax: either