File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,13 @@ def inline_mode
9898 def ignores_warnings
9999 @ignores_warnings || false
100100 end
101+
102+ def plugin
103+ # Pick a Dangerfile plugin for a chosen request_source
104+ # based on https://github.com/danger/danger/blob/master/lib/danger/plugin_support/plugin.rb#L31
105+ plugins = Plugin . all_plugins . select { |plugin | Dangerfile . essential_plugin_classes . include? plugin }
106+ @plugin ||= plugins . select { |p | p . method_defined? :html_link } . map { |p | p . new ( @dangerfile ) } . compact . first
107+ end
101108 # rubocop:enable Lint/DuplicateMethods
102109
103110 # Reads a file with JSON Xcode summary and reports it.
@@ -210,11 +217,6 @@ def parse_test_location(failure)
210217 end
211218
212219 def format_path ( path )
213- # Pick a Dangerfile plugin for a chosen request_source
214- # based on https://github.com/danger/danger/blob/master/lib/danger/plugin_support/plugin.rb#L31
215- plugins = Plugin . all_plugins . select { |plugin | Dangerfile . essential_plugin_classes . include? plugin }
216- plugin = plugins . select { |p | p . method_defined? :html_link } . map { |p | p . new ( @dangerfile ) } . compact . first
217-
218220 if plugin
219221 clean_path , line = parse_filename ( path )
220222 path = clean_path + '#L' + line if clean_path && line
You can’t perform that action at this time.
0 commit comments