class Cxxproject::ErrorParser
Constants
- SEVERITY_ERROR
- SEVERITY_INFO
- SEVERITY_OK
- SEVERITY_WARNING
Public Instance Methods
get_severity(str)
click to toggle source
# File lib/cxxproject/errorparser/error_parser.rb, line 24 def get_severity(str) if str == "info" || str == "note" SEVERITY_INFO elsif str == "warning" SEVERITY_WARNING elsif str == "error" SEVERITY_ERROR else raise "Unknown severity: #{str}" end end
scan(consoleOutput, proj_dir)
click to toggle source
# File lib/cxxproject/errorparser/error_parser.rb, line 20 def scan(consoleOutput, proj_dir) raise "Use specialized classes only" end
scan_lines(consoleOutput, proj_dir)
click to toggle source
scan the output from the console line by line and return a list of ErrorDesc
objects. for none-error/warning lines the description object will indicate that as severity 255 for single line errors/warnings: description will contain severity, line-number, message and file-name
for multi-line errors/warnings:
one description object for each line, first one will contain all single line error information, all following desc.objects will just repeat the severity and include the message
# File lib/cxxproject/errorparser/error_parser.rb, line 44 def scan_lines(consoleOutput, proj_dir) raise "Use specialized classes only" end