Sha256: f1eb3740539071a1e601b52f7b76383ffa762a242ce6c861eb5fb6aa384d0135

Contents?: true

Size: 1 KB

Versions: 48

Compression:

Stored size: 1 KB

Contents

require_relative 'error_parser'

module Bake
  class GCCLinkerErrorParser < ErrorParser

    def initialize()
      # todo: is every line an error?
      # todo: some linker errors look like simple text, dunno how to parse properly...
      # @error_expression1 = /(.*:\(\..*\)): (.*)/  # e.g. /c/Tool/Temp/ccAlar4R.o:x.cpp:(.text+0x17): undefined reference to `_a'
      # @error_expression2 = /(.*):([0-9]+): (.*)/  # e.g. /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld:roodi.yml.a:1: syntax error
    end

    def scan_lines(consoleOutput, proj_dir)
      res = []
      consoleOutput[0].each_line do |l|
        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
        res << d
      end
      [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/gcc_linker_error_parser.rb
bake-toolkit-2.71.0 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.70.1 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.70.0 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.69.0 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.68.1 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.68.0 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.67.0 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.66.0 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.65.2 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.65.1 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.65.0 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.64.4 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.64.3 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.64.2 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.64.1 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.64.0 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.63.2 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.63.1 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb
bake-toolkit-2.63.0 lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb