lib/checkstyle_format/plugin.rb in danger-checkstyle_xml-0.0.1 vs lib/checkstyle_format/plugin.rb in danger-checkstyle_xml-0.0.2

- old
+ new

@@ -51,15 +51,19 @@ def parse(text) require "ox" doc = Ox.parse(text) + present_elements = doc.nodes.first.nodes.reject do |test| test.nodes.empty? end + base_path_suffix = @base_path.end_with?("/") ? "" : "/" + base_path = @base_path + base_path_suffix + present_elements.flat_map do |parent| parent.nodes.map do |child| CheckstyleError.generate(child, parent, base_path) end end @@ -73,9 +77,10 @@ end end def send_inline_comment(errors) errors.each do |error| + puts "Sending inline comment to file #{error.file_name}, line #{error.line}" warn(error.message, file: error.file_name, line: error.line) end end end end