Sha256: 3f7bb9015015ec199cdd79ae184de8901ee6280ede103c323feb1078196f9a05

Contents?: true

Size: 1009 Bytes

Versions: 48

Compression:

Stored size: 1009 Bytes

Contents

require_relative '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

48 entries across 48 versions & 1 rubygems

Version Path
bake-toolkit-2.72.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.71.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.70.1 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.70.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.69.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.68.1 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.68.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.67.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.66.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.65.2 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.65.1 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.65.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.64.4 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.64.3 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.64.2 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.64.1 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.64.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.63.2 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.63.1 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb
bake-toolkit-2.63.0 lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb