External Tool Output Window Parsing

Post here any ideas/problems/suggestions you have regarding CodeLite's ExternalTools plugin

External Tool Output Window Parsing

Postby kernels » Mon Apr 10, 2017 8:37 am

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!
kernels
CodeLite Curious
 
Posts: 2
Joined: Mon Apr 10, 2017 8:31 am

Re: External Tool Output Window Parsing

Postby eranif » Tue Apr 11, 2017 9:45 pm

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
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
 
Posts: 5576
Joined: Wed Feb 06, 2008 9:29 pm

Re: External Tool Output Window Parsing

Postby kernels » Wed Apr 19, 2017 5:36 am

Thanks Eran, I will give that a try. Appreciate your time and reply.
kernels
CodeLite Curious
 
Posts: 2
Joined: Mon Apr 10, 2017 8:31 am


Return to External Tools

Who is online

Users browsing this forum: No registered users and 1 guest

cron