Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: mall on July 26, 2017, 01:55:39 pm

Title: Build log parser
Post by: mall on July 26, 2017, 01:55:39 pm
Hello,

I am facing problem that my cross compiler is generating slightly different format of warning/error messages therefore they are not properly converted to Build messages.

Similar problem is if I would like to use PC lint to parse standard build output.

I could not find if there is already possibility to setup some rules or I have to write plugin for it. Also if the plugin have to be written in C++ or can be done as Squirrel script.

Thank you for any help/direction how to start, which module is responsible for it.

Best
Richard
Title: Re: Build log parser
Post by: mall on July 26, 2017, 04:00:22 pm
I wonder if content of file /share/CodeBlocks/compilers/options_common_re.xml has something with it.

Code
<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_compiler_options>
<CodeBlocks_compiler_options>
    <RegEx name="Fatal error"
           type="error"
           msg="1">
        <![CDATA[FATAL:[ \t]*(.*)]]>
    </RegEx>
    <RegEx name="'In function...' info"
           type="info"
           msg="2"
           file="1">
        <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):[ \t]+([iI]n ([cC]lass|[cC]onstructor|[dD]estructor|[fF]unction|[mM]ember [fF]unction).*)]]>
    </RegEx>
    <RegEx name="'Skipping N instantiation contexts' info (2)"
           type="info"
           msg="3"
           file="1"
           line="2">
        <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t]+(\[[ \t]+[Ss]kipping [0-9]+ instantiation contexts[ \t]+\])]]>
    </RegEx>
Title: Re: Build log parser
Post by: stahta01 on July 26, 2017, 05:12:27 pm
Hello,

I am facing problem that my cross compiler is generating slightly different format of warning/error messages therefore they are not properly converted to Build messages.


It it parsed using Reg Expressions; look at the Advanced Compiler Setting to adjust the values used.

Settings -> Compiler
Far right Tab "Other Settings"
Button "Advanced Options"
Tab "Output Parsing"

Tim S.