From dd0dbee73b9f0951c112f6082a8e50bbf8612989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 25 Oct 2019 03:41:00 +0200 Subject: [PATCH] Reduce severity of HasManyOrHasOneDependent rule This is actually a hack. We want Hound to warn us about this rule; however, we don't want to be notified about our many existing offenses. Ideally we would add the `dependent` option to all existing models. However, this is extra tricky because adding this option would change existing behavior. --- .rubocop.yml | 2 -- .rubocop_basic.yml | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 59bdce84d..e05f29bf6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1 @@ inherit_from: .rubocop_basic.yml -Rails/HasManyOrHasOneDependent: - Enabled: true diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml index 4e85f36ec..27332462f 100644 --- a/.rubocop_basic.yml +++ b/.rubocop_basic.yml @@ -218,6 +218,10 @@ Rails/FindBy: Rails/FindEach: Enabled: true +Rails/HasManyOrHasOneDependent: + Enabled: true + Severity: refactor + Rails/HttpPositionalArguments: Enabled: true