From fdd5c2a476dade1dd0874e37ab0c0b9ff88381ab Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sat, 3 Dec 2022 15:07:15 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- rubocop/cop/gitlab/feature_available_usage.rb | 2 +- rubocop/cop/graphql/id_type.rb | 2 +- rubocop/cop/migration/add_reference.rb | 2 +- rubocop/cop/rspec/factory_bot/inline_association.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'rubocop') diff --git a/rubocop/cop/gitlab/feature_available_usage.rb b/rubocop/cop/gitlab/feature_available_usage.rb index 16f23bb06c4..fcf4992a19d 100644 --- a/rubocop/cop/gitlab/feature_available_usage.rb +++ b/rubocop/cop/gitlab/feature_available_usage.rb @@ -39,7 +39,7 @@ module RuboCop return if feature_name(node).nil? return if ALL_FEATURES.include?(feature_name(node)) && args_count(node) == 2 - if ALL_FEATURES.exclude?(feature_name(node)) + if !ALL_FEATURES.include?(feature_name(node)) add_offense(node, message: licensed_feature_message(node)) elsif args_count(node) < 2 add_offense(node, message: NOT_ENOUGH_ARGS_MSG) diff --git a/rubocop/cop/graphql/id_type.rb b/rubocop/cop/graphql/id_type.rb index a86c31de2d4..eb677aa4507 100644 --- a/rubocop/cop/graphql/id_type.rb +++ b/rubocop/cop/graphql/id_type.rb @@ -21,7 +21,7 @@ module RuboCop private def does_not_match?(arg) - WHITELISTED_ARGUMENTS.exclude?(arg) + !WHITELISTED_ARGUMENTS.include?(arg) end end end diff --git a/rubocop/cop/migration/add_reference.rb b/rubocop/cop/migration/add_reference.rb index 6f2648c8f93..02a0ef899b4 100644 --- a/rubocop/cop/migration/add_reference.rb +++ b/rubocop/cop/migration/add_reference.rb @@ -41,7 +41,7 @@ module RuboCop private def existing_table?(new_tables, table) - new_tables.exclude?(table) + !new_tables.include?(table) end def create_table?(node) diff --git a/rubocop/cop/rspec/factory_bot/inline_association.rb b/rubocop/cop/rspec/factory_bot/inline_association.rb index a770dac9794..8d7c73b99a0 100644 --- a/rubocop/cop/rspec/factory_bot/inline_association.rb +++ b/rubocop/cop/rspec/factory_bot/inline_association.rb @@ -99,7 +99,7 @@ module RuboCop def inside_assocation_definition?(node) node.each_ancestor(:block).any? do |parent| name = association_definition(parent) - name && SKIP_NAMES.exclude?(name) + name && !SKIP_NAMES.include?(name) end end end -- cgit v1.2.3