From 27c73c22ea9e7d28cca03423fd06ad0c4f04e264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 23 Jun 2019 00:37:31 +0200 Subject: [PATCH] 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. --- .rubocop.yml | 3 --- .rubocop_basic.yml | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 6a374e962..5e563232c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -165,9 +165,6 @@ Rails/SkipsModelValidations: Rails/UniqBeforePluck: Enabled: true -Rails/UnknownEnv: - Enabled: true - Rails/Validation: Enabled: true diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml index 2af5aff4a..865a6c76f 100644 --- a/.rubocop_basic.yml +++ b/.rubocop_basic.yml @@ -148,6 +148,15 @@ Rails/SafeNavigation: Rails/TimeZone: Enabled: true +Rails/UnknownEnv: + Enabled: true + Environments: + - development + - test + - production + - preproduction + - staging + RSpec/NotToNot: Enabled: true