.rubocop.yml

Summary

Maintainability
Test Coverage
require: rubocop-rails
AllCops:
  NewCops: disable
  # The serializers go wrong with relationships, rubocop interprets
  # them a `has_many` from ActiveRecord and autocorrects it to a
  # proc. Which is not how the JSONApi serializer works
  TargetRubyVersion: 2.5 
  Exclude:
    - db/schema.rb
    - app/serializers/**/*
Rails:
  Enabled: true
Layout/LineLength:
  Max: 100
Metrics/AbcSize:
  Enabled: false  
Style/StringLiterals:
  EnforcedStyle: double_quotes
Style/MethodCalledOnDoEndBlock:
  Description: 'Avoid chaining a method call on a do...end block.'
  Enabled: true
Metrics/ClassLength:
  Max: 400
Style/Documentation:
  Enabled: false
Style/FrozenStringLiteralComment:
  Enabled: true
# I don't think there's a good way to enforce this sometime commit_sha1 is ok sometimes user_1 is ok
Naming/VariableNumber:
  Enabled: false
# this one triggers a lot of false positive as orbf rules are "%{}"-based
Style/FormatStringToken:
  EnforcedStyle: template
Rails/Delegate:
  Enabled: false
Layout/HashAlignment:
  EnforcedHashRocketStyle: table
  EnforcedColonStyle: table
  EnforcedLastArgumentHashStyle: always_inspect
Layout/ArgumentAlignment:
  Enabled: true