Class: CheckstyleError

Inherits:
Struct
  • Object
show all
Defined in:
lib/checkstyle_format/checkstyle_error.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#columnObject

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



1
2
3
# File 'lib/checkstyle_format/checkstyle_error.rb', line 1

def column
  @column
end

#file_nameObject

Returns the value of attribute file_name

Returns:

  • (Object)

    the current value of file_name



1
2
3
# File 'lib/checkstyle_format/checkstyle_error.rb', line 1

def file_name
  @file_name
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



1
2
3
# File 'lib/checkstyle_format/checkstyle_error.rb', line 1

def line
  @line
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



1
2
3
# File 'lib/checkstyle_format/checkstyle_error.rb', line 1

def message
  @message
end

#severityObject

Returns the value of attribute severity

Returns:

  • (Object)

    the current value of severity



1
2
3
# File 'lib/checkstyle_format/checkstyle_error.rb', line 1

def severity
  @severity
end

#sourceObject

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



1
2
3
# File 'lib/checkstyle_format/checkstyle_error.rb', line 1

def source
  @source
end

Class Method Details

.generate(node, parent_node, base_path) ⇒ Object



2
3
4
5
6
7
8
9
10
11
# File 'lib/checkstyle_format/checkstyle_error.rb', line 2

def self.generate(node, parent_node, base_path)
  CheckstyleError.new(
    parent_node[:name].sub(/^#{base_path}/, ""),
    node[:line].to_i,
    node[:column].nil? ? nil : node[:column].to_i,
    node[:severity],
    node[:message],
    node[:source]
  )
end