# We like using `render/redirect and return` in controllers, like
# the rails guides suggest (see: http://guides.rubyonrails.org/layouts_and_rendering.html#avoiding-double-render-errors)
# so enable this cop only for conditionals
Style/AndOr:
  EnforcedStyle: conditionals

# "FOO".casecmp("foo").zero? is not as readable as "foo".upcase == "FOO" so
# we disable this cop entirely
Performance/Casecmp:
  Enabled: false

Metrics/BlockLength:
  Exclude:
    - 'config/routes.rb'
    - 'lib/tasks/**/*.rake'
    - 'spec/**/*.rb'
    - 'db/migrate/*.rb'

# We like using `render/redirect and return` in controllers, like
# the rails guides suggest (see: http://guides.rubyonrails.org/layouts_and_rendering.html#avoiding-double-render-errors)
# so enable this cop only for conditionals
Style/AndOr:
  EnforcedStyle: conditionals

Metrics/BlockLength:
  Exclude:
    - 'config/routes.rb'
    - 'lib/tasks/**/*.rake'
    - 'spec/**/*.rb'
    - 'db/migrate/*.rb'

Remove config for Performance/Casecmp Rubocop
Remove config for Performance/Casecmp Rubocop

- As of govuk-lint 3.11.2, govuk-lint doesn't include Performance
  Rubocops because they were split out from the core Rubocop gem.
- This config here causes warnings in `govuk-lint-ruby` output because
  we don't require 'rubocop-performance' to get these Performance cops:
  `Warning: unrecognized cop Performance/Casecmp found in .rubocop.yml`
- Given that the Performance cops were removed so many versions of
  govuk-lint ago, I'm going to take a punt that we don't need them in
  this app and so we can get rid of this line to get rid of three (!)
  warnings.
