phan intergrations

Discussion about CodeLite development process and patches

phan intergrations

Postby AJenbo » Fri Oct 13, 2017 12:05 am

Phan is a powerful php static anazlyer, capable of finding a lot of issues you would normaly only find when compiling more strict languages. Unfortunatly the process requires that it analyzes the entire project witch is time consuming. For IDE intergration they provide at deamon mode where it tracks any file changes in the project and the IDE can then request an analysis of a single file (can even be from the buffer version).
https://github.com/phan/phan/wiki/Using ... aemon-Mode

The thing is I don't know how I would go about launching the deamon/server automatically from CodeLite instead of needing the user to do so. Any idea how to do this?

Also this might be somewhat reusable for integrating with with clang_refactor as it has a similar setup:
https://clang.llvm.org/docs/ClangTools.html
(a bit the project is still in an early state)
AJenbo
CodeLite Enthusiast
 
Posts: 41
Joined: Mon May 22, 2017 12:06 pm

Re: phan intergrations

Postby eranif » Sun Oct 15, 2017 12:04 am

Starting a process from within CodeLite is a simple task:

Look here for how we do this for NodeJS:
https://github.com/eranif/codelite/blob ... r.cpp#L123

You need to bind two events: wxEVT_ASYNC_PROCESS_OUTPUT & wxEVT_ASYNC_PROCESS_TERMINATED:
https://github.com/eranif/codelite/blob ... er.cpp#L32
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
 
Posts: 5631
Joined: Wed Feb 06, 2008 9:29 pm

Re: phan intergrations

Postby AJenbo » Sun Oct 15, 2017 7:12 pm

Thanks that looks like what I was looking for :)

Another issue is that by default the server runs on port 4846, if a user has multiple instances of codelite running I would need a way to pick a different port for the service to listen on. Is there a good way to figure out what ports are available, or do you think it's fair to limit it to one instance at a time?
AJenbo
CodeLite Enthusiast
 
Posts: 41
Joined: Mon May 22, 2017 12:06 pm


Return to CodeLite Development / Patches

Who is online

Users browsing this forum: No registered users and 4 guests

cron