From 34ed18988155dfef5600abef4f53ac0f27635382 Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Mon, 23 Nov 2020 10:08:28 +0100 Subject: [PATCH] Maintenance: Fix matching of zammad cops for addons and do not check create_table for reset column information. --- .rubocop/cop/zammad/exists_reset_column_information.rb | 2 +- .rubocop/default.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.rubocop/cop/zammad/exists_reset_column_information.rb b/.rubocop/cop/zammad/exists_reset_column_information.rb index 4a65484e3..250fa4bad 100644 --- a/.rubocop/cop/zammad/exists_reset_column_information.rb +++ b/.rubocop/cop/zammad/exists_reset_column_information.rb @@ -3,7 +3,7 @@ module RuboCop module Zammad class ExistsResetColumnInformation < Cop def_node_matcher :table?, <<-PATTERN - $(send _ {:create_table :change_table} ... ) + $(send _ :change_table ... ) PATTERN def_node_matcher :column?, <<-PATTERN diff --git a/.rubocop/default.yml b/.rubocop/default.yml index 6f63c8e5e..318e5dc8f 100644 --- a/.rubocop/default.yml +++ b/.rubocop/default.yml @@ -316,7 +316,9 @@ Zammad/PreferNegatedIfOverUnless: Zammad/ExistsDateTimePrecision: Include: - "db/migrate/*.rb" + - "**/db/addon/**/*.rb" Zammad/ExistsResetColumnInformation: Include: - "db/migrate/*.rb" + - "**/db/addon/**/*.rb"