Sha256: 01416dcffd6056738ba771d16d5cb1ed8572dfa7a0b511e31a7fb94dd0b3be52

Contents?: true

Size: 408 Bytes

Versions: 1

Compression:

Stored size: 408 Bytes

Contents

# frozen_string_literal: true

CheckstyleError = Struct.new(:file_name, :line, :column, :severity, :message, :source) do
  def self.generate(node, parent_node, sub_regex)
    relative_path = parent_node[:name].sub(sub_regex, "")

    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.5 lib/checkstyle_format/checkstyle_error.rb