From 52f56053104ceb8469d622008cd05f5f86a554ef Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Fri, 21 Aug 2020 10:15:25 +0200 Subject: [PATCH] Maintenance: Custom rubocops should inherit from Base not Cop (as other core rubocops). --- .rubocop/cop/zammad/exists_condition.rb | 2 +- .rubocop/cop/zammad/prefer_negated_if_over_unless.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.rubocop/cop/zammad/exists_condition.rb b/.rubocop/cop/zammad/exists_condition.rb index b66b10396..801bd6d5b 100644 --- a/.rubocop/cop/zammad/exists_condition.rb +++ b/.rubocop/cop/zammad/exists_condition.rb @@ -20,7 +20,7 @@ module RuboCop # if exists?(name: 'Rubocop') # if !exists?(name: 'Rubocop') # unless exists?(name: 'Rubocop') - class ExistsCondition < Cop + class ExistsCondition < Base def_node_matcher :find_by_condition?, <<-PATTERN { diff --git a/.rubocop/cop/zammad/prefer_negated_if_over_unless.rb b/.rubocop/cop/zammad/prefer_negated_if_over_unless.rb index 49b0d8a9b..f6c3466fc 100644 --- a/.rubocop/cop/zammad/prefer_negated_if_over_unless.rb +++ b/.rubocop/cop/zammad/prefer_negated_if_over_unless.rb @@ -11,7 +11,7 @@ module RuboCop # # good # if !statement # return if !statement - class PreferNegatedIfOverUnless < Cop + class PreferNegatedIfOverUnless < Base include ConfigurableEnforcedStyle include NegativeConditional extend AutoCorrector