Sha256: d09d97251e5a841289971e71a24a61f23d6c27736f6bb58e89babd9d02e7b471

Contents?: true

Size: 1.05 KB

Versions: 38

Compression:

Stored size: 1.05 KB

Contents

require 'bake/toolchain/errorparser/error_parser'

module Bake
  class MSVCLinkerErrorParser < ErrorParser

    def initialize()
      # todo: is every line an error?
    end

    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.message = 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


  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
bake-toolkit-2.20.4 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.20.3 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.20.2 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.20.1 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.19.2 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.19.1 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.19.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.18.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.17.4 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.17.3 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.17.2 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.17.1 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.16.1 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.15.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.14.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.13.1 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.13.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.12.2 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.12.1 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.12.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb