Class: CheckstyleError
- Inherits:
-
Struct
- Object
- Struct
- CheckstyleError
- Defined in:
- lib/checkstyle_format/checkstyle_error.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#line ⇒ Object
Returns the value of attribute line.
-
#message ⇒ Object
Returns the value of attribute message.
-
#severity ⇒ Object
Returns the value of attribute severity.
-
#source ⇒ Object
Returns the value of attribute source.
Class Method Summary collapse
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column
3 4 5 |
# File 'lib/checkstyle_format/checkstyle_error.rb', line 3 def column @column end |
#file_name ⇒ Object
Returns the value of attribute file_name
3 4 5 |
# File 'lib/checkstyle_format/checkstyle_error.rb', line 3 def file_name @file_name end |
#line ⇒ Object
Returns the value of attribute line
3 4 5 |
# File 'lib/checkstyle_format/checkstyle_error.rb', line 3 def line @line end |
#message ⇒ Object
Returns the value of attribute message
3 4 5 |
# File 'lib/checkstyle_format/checkstyle_error.rb', line 3 def @message end |
#severity ⇒ Object
Returns the value of attribute severity
3 4 5 |
# File 'lib/checkstyle_format/checkstyle_error.rb', line 3 def severity @severity end |
#source ⇒ Object
Returns the value of attribute source
3 4 5 |
# File 'lib/checkstyle_format/checkstyle_error.rb', line 3 def source @source end |
Class Method Details
.generate(node, parent_node, sub_regex) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/checkstyle_format/checkstyle_error.rb', line 4 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 |