inherit_from:
  - https://dev.k.io/rubocop/rubocop.yml

require:
  - rubocop-rails

# Dynamic find by shouldn't be used however we often define non-dynamic methods
# that match this pattern. We won't auto correct these (because it could break
# lots of things if one is missed from the whitelist) and the whitelist covered
# the main ones that we use.
Rails/DynamicFindBy:
  AutoCorrect: false
  Whitelist:
    - find_by_record_id!
    - find_by_record_id
    - find_by_rid!
    - find_by_rid
    - find_by_secret
    - find_by_record_id_for_user!
    - find_by_rid_for_user!
    - find_by_record_id_for_user
    - find_by_rid_for_user
    - find_by_secure_token
    - find_by_token
    - find_by_token!
    - find_by_fqdn
    - find_by_fqdn!
    - find_by_full_permalink

# We do need to be able to save methods without validations and we trust our
# team to know what they're doing here.
Rails/SkipsModelValidations:
  Enabled: false
