Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-03 09:07:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-03 09:07:06 +0300
commita3759fc2e1f8aa1493840ab0d4ebd4a2e5f495aa (patch)
treefb8f046819669955006fe21043bfcc13dbe40209 /rubocop
parent336483a4c150a112e83d95538218c59d9a952768 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r--rubocop/cop/gitlab/feature_available_usage.rb2
-rw-r--r--rubocop/cop/graphql/id_type.rb2
-rw-r--r--rubocop/cop/migration/add_reference.rb2
-rw-r--r--rubocop/cop/rspec/factory_bot/inline_association.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/rubocop/cop/gitlab/feature_available_usage.rb b/rubocop/cop/gitlab/feature_available_usage.rb
index fcf4992a19d..16f23bb06c4 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.include?(feature_name(node))
+ if ALL_FEATURES.exclude?(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 eb677aa4507..a86c31de2d4 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.include?(arg)
+ WHITELISTED_ARGUMENTS.exclude?(arg)
end
end
end
diff --git a/rubocop/cop/migration/add_reference.rb b/rubocop/cop/migration/add_reference.rb
index 02a0ef899b4..6f2648c8f93 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.include?(table)
+ new_tables.exclude?(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 8d7c73b99a0..a770dac9794 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.include?(name)
+ name && SKIP_NAMES.exclude?(name)
end
end
end