Sha256: f8ca6be5c88cdc92148ce103577f80e743bb627f4156512a7f12feed2f49b1bc
Contents?: true
Size: 600 Bytes
Versions: 1
Compression:
Stored size: 600 Bytes
Contents
# frozen_string_literal: true CheckstyleError = Struct.new(:file_name, :line, :column, :severity, :message, :source) do def self.generate(node, parent_node, base_path) # Print base path, full path, and relative path puts "Base path: #{base_path}" puts "Parent node path: #{parent_node[:name]}" relative_path = parent_node[:name].sub(/^#{base_path}/, "") puts "Relative path: #{relative_path}" CheckstyleError.new( relative_path, node[:line].to_i, node[:column]&.to_i, node[:severity], node[:message], node[:source] ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
danger-checkstyle_xml-0.0.3 | lib/checkstyle_format/checkstyle_error.rb |