Build EYE
It's a static analyzer wrapper for Clang. The original scan-build
is written in Perl. This package contains reimplementation of that scripts
in Python. The reimplementation diverge from the original scripts in a few
places.
How to get
Will be available soon from the Python Package Index.
How to build
Should be quite portable on UNIX operating systems. It has been tested on FreeBSD, GNU/Linux and OS X.
Prerequisites
- an ANSI C compiler, to compile the sources.
- cmake, to configure the build process.
- make, to run the build. The makefile is generated by
cmake. - python interpreter (version 2.7, 3.2, 3.3, 3.4).
Build commands
Please consider to use virtualenv or other tool to set up the working
environment.
$ python setup.py build
$ python setup.py install
$ python setup.py test
How to use
This package contains 3 executable scripts. One called bear which takes
a build command as argument and produce a compilation database file.
(Compilation database is a JSON file described here.) The second
called beye which takes a compilation database and run the analyzer
against it and generates a report. The third called scan-build which does
what bear and beye together do.
After installation the usage is like this:
$ scan-build <your build command>
It runs the analyzer and print out the location of the report at the end.
Use --help to know more about the commands.
Known problems
Because it uses LD_PRELOAD or DYLD_INSERT_LIBRARIES environment variables,
it does not append to it, but overrides it. So builds which are using these
variables might not work. (I don't know any build tool which does that, but
please let me know if you do.)
Problem reports
If you find a bug in this documentation or elsewhere in the program or would like to propose an improvement, please use the project's github issue tracker. Please describing the bug and where you found it. If you have a suggestion how to fix it, include that as well. Patches are also welcome.