Class: Bake::MSVCLinkerErrorParser
- Inherits:
-
ErrorParser
- Object
- ErrorParser
- Bake::MSVCLinkerErrorParser
- Defined in:
- lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
Constant Summary
Constants inherited from ErrorParser
ErrorParser::SEVERITY_ERROR, ErrorParser::SEVERITY_INFO, ErrorParser::SEVERITY_OK, ErrorParser::SEVERITY_WARNING
Instance Method Summary collapse
-
#initialize ⇒ MSVCLinkerErrorParser
constructor
A new instance of MSVCLinkerErrorParser.
- #scan_lines(consoleOutput, proj_dir) ⇒ Object
Methods inherited from ErrorParser
#get_severity, #get_tasking_severity, #inv_severity, #makeVsError, #scan
Constructor Details
#initialize ⇒ MSVCLinkerErrorParser
Returns a new instance of MSVCLinkerErrorParser.
6 7 8 |
# File 'lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb', line 6 def initialize() # todo: is every line an error? end |
Instance Method Details
#scan_lines(consoleOutput, proj_dir) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb', line 10 def scan_lines(consoleOutput, proj_dir) res = [] consoleOutputFiltered = "" filterLine = 0 consoleOutput[0].each_line do |l| filterLine = filterLine + 1 next if (filterLine == 1 and l.include?"Microsoft (R)") next if (filterLine == 2 and l.include?"Copyright (C)") next if (filterLine == 3 and l.strip.empty?) l.rstrip! d = ErrorDesc.new d.file_name = proj_dir d.line_number = 0 d. = l if l.length == 0 d.severity = SEVERITY_OK elsif l.include?" Warning:" d.severity = SEVERITY_WARNING else d.severity = SEVERITY_ERROR end consoleOutputFiltered << l res << d end consoleOutput[0] = consoleOutputFiltered [res, consoleOutput[0]] end |