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-11-01 21:12:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-01 21:12:39 +0300
commit68ce709bef9bc89bbb9869e24508777bbe0a1a1d (patch)
tree65dc0fd3693312debb7f40586c5682162081dc6c /tooling
parentb21334799a5226cdef52d4fb3b148f08af209f1a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'tooling')
-rw-r--r--tooling/danger/suggestion.rb20
1 files changed, 16 insertions, 4 deletions
diff --git a/tooling/danger/suggestion.rb b/tooling/danger/suggestion.rb
index da3c6b0e76f..ff1ca83876d 100644
--- a/tooling/danger/suggestion.rb
+++ b/tooling/danger/suggestion.rb
@@ -1,6 +1,5 @@
# frozen_string_literal: true
-require 'forwardable'
require_relative 'suggestor'
module Tooling
@@ -14,11 +13,8 @@ module Tooling
#
# @see Suggestor
class Suggestion
- extend Forwardable
include ::Tooling::Danger::Suggestor
- def_delegators :@context, :helper, :project_helper, :markdown
-
attr_reader :filename
def initialize(filename, context:)
@@ -34,6 +30,22 @@ module Tooling
comment_text: self.class::SUGGESTION
)
end
+
+ private
+
+ def helper(...)
+ # Previously, we were using `forwardable` but it emitted a mysterious warning:
+ # forwarding to private method Danger::Rubocop#helper
+ @context.helper(...)
+ end
+
+ def project_helper(...)
+ @context.project_helper(...)
+ end
+
+ def markdown(...)
+ @context.markdown(...)
+ end
end
end
end