From c2869f48870d86930aa669472f26726c79c31305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 22 Jun 2019 22:19:23 +0200 Subject: [PATCH] Move `Rails/RelativeDateConstant` to basic cops The reason for this rule is similar to dynamic factories: we want dynamic dates to be evaluted relative to the current time, and not relative to the moment the application was loaded. --- .rubocop.yml | 3 --- .rubocop_basic.yml | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index fb10526c8..91b73e7f7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -159,9 +159,6 @@ Rails/ReadWriteAttribute: Rails/RedundantReceiverInWithOptions: Enabled: true -Rails/RelativeDateConstant: - Enabled: true - Rails/RequestReferer: Enabled: true diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml index 90005227a..bc737cd77 100644 --- a/.rubocop_basic.yml +++ b/.rubocop_basic.yml @@ -59,6 +59,9 @@ Rails/ApplicationRecord: Rails/HttpPositionalArguments: Enabled: true +Rails/RelativeDateConstant: + Enabled: true + RSpec/NotToNot: Enabled: true