Page 1 of 1

External Tool Output Window Parsing

Posted: Mon Apr 10, 2017 8:37 am
by kernels
Hi there,

I have recently started using CodeLite and am very impressed. By far the best combination of easy-to-use while being complex enough to do all the things I want.

I am using it as an IDE for embedded ARM development using GCC.

I am in the process of setting up Lint to use for static analysis, have set it up as an external tool where the output shows up in the 'Output' tab below the code. Is there a way (may using the build patterns ?) to add the ability where I click on a Lint warning and the IDE jumps to the file and line of the warning, similar to what the build output window does with warnings and errors ?

On a side note, for some reason I don't seem to be able to set an external tool ID for the first external tool in the list, which makes it not work. Seems like it might be a bug in the IDE ?

Any advice appreciated!

Re: External Tool Output Window Parsing

Posted: Tue Apr 11, 2017 9:45 pm
by eranif
Is there a way (may using the build patterns ?) to add the ability where I click on a Lint warning and the IDE jumps to the file and line of the warning, similar to what the build output window does with warnings and errors ?
I dont think that this is impossible to do with external tools.

However, there is a possible solution:

* Define a new compiler from Settings->Build Settings->Compilers tab, and click on the copy compiler icon ( it does not matter which compiler you select to copy from)
* In the new compiler, select the "Patterns" page and set up a regular expressions to match your lint tool error patterns (the default patterns matches GCC output, change it to fit your needs)
* Now, add new project: File->New -> New project -> Others -> Custom Makefile
* In the new project, open the project settings -> general -> compiler field select the new compiler you just created
* In the new project, open the project settings -> customize -> custom build, change the "Build" command to match your lint execution command

Now, whenever you want to run your lint tool, just build the new project you added, the output will appear in the "Build" tab and it will be parsed according to the regex defined by the new compiler you added earlier

HTH
Eran

Re: External Tool Output Window Parsing

Posted: Wed Apr 19, 2017 5:36 am
by kernels
Thanks Eran, I will give that a try. Appreciate your time and reply.