Configure Rails/UnknownEnv rubocop rule

We use staging and preproduction environments, which are not valid by
default.

This rule is useful because misspelling the name of an environment might
otherwise go unnoticed.
This commit is contained in:
Javi Martín
2019-06-23 00:37:31 +02:00
parent 9fe8c47528
commit 27c73c22ea
2 changed files with 9 additions and 3 deletions

View File

@@ -165,9 +165,6 @@ Rails/SkipsModelValidations:
Rails/UniqBeforePluck:
Enabled: true
Rails/UnknownEnv:
Enabled: true
Rails/Validation:
Enabled: true

View File

@@ -148,6 +148,15 @@ Rails/SafeNavigation:
Rails/TimeZone:
Enabled: true
Rails/UnknownEnv:
Enabled: true
Environments:
- development
- test
- production
- preproduction
- staging
RSpec/NotToNot:
Enabled: true