Class: CheckstyleReport::CheckstyleError
- Inherits:
-
Object
- Object
- CheckstyleReport::CheckstyleError
- Defined in:
- lib/checkstyle_report/checkstyle_report.rb
Overview
Represents a single error in Checkstyle format.
Constant Summary collapse
- SEVERITY_NORMAL =
Severity levels for Checkstyle errors.
'normal'
- SEVERITY_WARNING =
'warning'
- SEVERITY_ERROR =
'error'
Instance Attribute Summary collapse
-
#column ⇒ Integer
readonly
Returns the column number where the error occurred.
-
#line ⇒ Integer
readonly
Returns the line number where the error occurred.
-
#message ⇒ String
readonly
Returns the error message.
-
#name ⇒ String
readonly
Returns the name of the error.
-
#severity ⇒ String
readonly
Returns the severity level of the error.
-
#source ⇒ String
readonly
Returns the source of the error.
Instance Method Summary collapse
-
#initialize(severity, message, source, line, column, name) ⇒ CheckstyleError
constructor
Initializes a new instance of CheckstyleError.
Constructor Details
#initialize(severity, message, source, line, column, name) ⇒ CheckstyleError
Initializes a new instance of CheckstyleError.
Must be one of SEVERITY_NORMAL, SEVERITY_WARNING, or SEVERITY_ERROR.
119 120 121 122 123 124 125 126 |
# File 'lib/checkstyle_report/checkstyle_report.rb', line 119 def initialize(severity, , source, line, column, name) @severity = severity @message = @source = source @line = line @column = column @name = name end |
Instance Attribute Details
#column ⇒ Integer (readonly)
Returns the column number where the error occurred.
151 152 153 |
# File 'lib/checkstyle_report/checkstyle_report.rb', line 151 def column @column end |
#line ⇒ Integer (readonly)
Returns the line number where the error occurred.
146 147 148 |
# File 'lib/checkstyle_report/checkstyle_report.rb', line 146 def line @line end |
#message ⇒ String (readonly)
Returns the error message.
136 137 138 |
# File 'lib/checkstyle_report/checkstyle_report.rb', line 136 def @message end |
#name ⇒ String (readonly)
Returns the name of the error.
156 157 158 |
# File 'lib/checkstyle_report/checkstyle_report.rb', line 156 def name @name end |
#severity ⇒ String (readonly)
Returns the severity level of the error.
131 132 133 |
# File 'lib/checkstyle_report/checkstyle_report.rb', line 131 def severity @severity end |
#source ⇒ String (readonly)
Returns the source of the error.
141 142 143 |
# File 'lib/checkstyle_report/checkstyle_report.rb', line 141 def source @source end |