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>2023-07-13 00:08:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-13 00:08:10 +0300
commita6b21afb09a4b91e47db93b2443205bd4eef84e6 (patch)
tree75914410f8e34a0fadc6d9998f84d20c7fedf075 /rubocop
parent31f59b55c63f6a7add79c5987731387ae3a4f7ab (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r--rubocop/cop/project_path_helper.rb2
-rw-r--r--rubocop/cop/qa/selector_usage.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/rubocop/cop/project_path_helper.rb b/rubocop/cop/project_path_helper.rb
index 104a352949f..f053c9a01b7 100644
--- a/rubocop/cop/project_path_helper.rb
+++ b/rubocop/cop/project_path_helper.rb
@@ -12,7 +12,7 @@ module RuboCop
METHOD_NAME_PATTERN = /\A([a-z_]+_)?namespace_project(?:_[a-z_]+)?_(?:url|path)\z/.freeze
def on_send(node)
- return unless method_name(node).to_s =~ METHOD_NAME_PATTERN
+ return unless METHOD_NAME_PATTERN.match?(method_name(node).to_s)
namespace_expr, project_expr = arguments(node)
return unless namespace_expr && project_expr
diff --git a/rubocop/cop/qa/selector_usage.rb b/rubocop/cop/qa/selector_usage.rb
index d615bd2926c..c17f642bd06 100644
--- a/rubocop/cop/qa/selector_usage.rb
+++ b/rubocop/cop/qa/selector_usage.rb
@@ -27,7 +27,7 @@ module RuboCop
return if in_qa_file?(node)
return unless in_spec?(node)
- add_offense(node, message: MESSAGE % node.value) if SELECTORS =~ node.value
+ add_offense(node, message: MESSAGE % node.value) if SELECTORS.match?(node.value)
rescue StandardError
# catch all errors and ignore them.
# without this catch-all rescue, rubocop will fail