From a27ada662d49b90eb2b83317696b6c7c31d39b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 21 Jun 2019 03:27:03 +0200 Subject: [PATCH] Move Rails/Date and Rails/TimeZone to basic cops Using Date.today and Time.now is a common mistake which might lead to obscure bugs. Now we're making sure we'll receive a warning when a pull request uses these methods. --- .rubocop.yml | 6 ------ .rubocop_basic.yml | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 91b73e7f7..b1c79a16c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -93,9 +93,6 @@ Rails/Blank: Rails/CreateTableWithTimestamps: Enabled: true -Rails/Date: - Enabled: true - Rails/Delegate: Enabled: true @@ -177,9 +174,6 @@ Rails/ScopeArgs: Rails/SkipsModelValidations: Enabled: true -Rails/TimeZone: - Enabled: true - Rails/UniqBeforePluck: Enabled: true diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml index bc737cd77..bfeedbc27 100644 --- a/.rubocop_basic.yml +++ b/.rubocop_basic.yml @@ -56,12 +56,18 @@ Rails/ApplicationJob: Rails/ApplicationRecord: Enabled: true +Rails/Date: + Enabled: true + Rails/HttpPositionalArguments: Enabled: true Rails/RelativeDateConstant: Enabled: true +Rails/TimeZone: + Enabled: true + RSpec/NotToNot: Enabled: true