[cfe-dev] scan-build in python

Laszlo Nagy rizsotto.mailinglist at gmail.com
Tue Oct 28 15:25:17 PDT 2014


hi there,

during the last half year i did re-implemented the `scan-build` perl
scripts in python. to make it into the Clang code base i would like to know
what would be the acceptance criteria for such scripts.

the current version available from here <https://github.com/rizsotto/Beye>

- it works, tested on python 2.7, 3.x,
- it has no dependencies other than standard python modules,
- it differs from the current perl implementation in functionality,
  - does not generate not-used-attribute files, since analyzer does not
report it;
  - does not generate parser reject report, since analyzer does not report
it;
  - does not check '-isysroot' uniqness;
  - does execute 'clang' binary only if it needed (one time less than
current perl);
  - does not copy pre-compiled header (.ghc) files into report directory;
  - does create compilation database during the analysis;
  - analyzer is run only after the compilation database were created (not
during the build);
- it was tested on Linux, FreeBSD and OS X,
- it has functional and unit tests around,
- it is a self contained python package,
  - it's decomposed into multiple modules;
- it has more documentation inside than the original implementation.

what format would you like to get it? i'm thinking to create a python
package out of it. (currently it's non python package conform.) but
recently took a look on llvm-lit. which might be a good pattern to follow.
(they keep python module structure, but CMake also plays role to install
those scripts.)

regards,
Laszlo

On Mon, Oct 20, 2014 at 6:10 PM, Laszlo Nagy <rizsotto.mailinglist at gmail.com
> wrote:

> hi there,
>
> it's me again with my favorite topic. ;) coming to the end of the rewrite
> (of `scan-build` in python) i need some help from native English speakers.
> i tried my best to explain how it works, but not sure it is understandable
> for others. please correct my Hungarian English, either on the comments or
> on the function/variable naming... but any feedback on the code is valued.
>
> here is the source <https://github.com/rizsotto/Beye>
>
> please use github to submit those changes/suggestions. create tickets or
> write comments or send emails. (wanted generate not much noise here. but
> that's also fine for me. :))
>
> regards,
> Laszlo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141028/85f69f0a/attachment.html>


More information about the cfe-dev mailing list