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.
This commit is contained in:
Javi Martín
2019-06-21 03:27:03 +02:00
parent c574a4d93a
commit a27ada662d
2 changed files with 6 additions and 6 deletions

View File

@@ -93,9 +93,6 @@ Rails/Blank:
Rails/CreateTableWithTimestamps: Rails/CreateTableWithTimestamps:
Enabled: true Enabled: true
Rails/Date:
Enabled: true
Rails/Delegate: Rails/Delegate:
Enabled: true Enabled: true
@@ -177,9 +174,6 @@ Rails/ScopeArgs:
Rails/SkipsModelValidations: Rails/SkipsModelValidations:
Enabled: true Enabled: true
Rails/TimeZone:
Enabled: true
Rails/UniqBeforePluck: Rails/UniqBeforePluck:
Enabled: true Enabled: true

View File

@@ -56,12 +56,18 @@ Rails/ApplicationJob:
Rails/ApplicationRecord: Rails/ApplicationRecord:
Enabled: true Enabled: true
Rails/Date:
Enabled: true
Rails/HttpPositionalArguments: Rails/HttpPositionalArguments:
Enabled: true Enabled: true
Rails/RelativeDateConstant: Rails/RelativeDateConstant:
Enabled: true Enabled: true
Rails/TimeZone:
Enabled: true
RSpec/NotToNot: RSpec/NotToNot:
Enabled: true Enabled: true