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:
Diffstat (limited to 'tooling/danger/suggestion.rb')
-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