[Scons-users] style guide cheker
Philipp Kraus
philipp.kraus at flashpixx.de
Wed Jan 2 15:06:14 EST 2013
Hi Bill,
I have build LLVM with CLang and install the Python bindings for CLang. Now I can push the Scons source files to an
own builder and run over the AST (abstract syntax tree) and do the checks, I can extract function-, namespaces- and classnames,
also I can get the template types, variables (local, global, member) with their types and names.
The Python bindings are difficult and I have created a proof-of-concept at the moment. I will create a builder
in which the user can set functions that are called, if the CLang iterator runs over the tree, so on each tree element
a check can be run. This can be combined with regular expression checking, so I can analyse each source file.
Phil
Am 02.01.2013 um 19:13 schrieb Bill Deegan:
> Phil,
>
> In general tools with significant logic should be run not inside SCons.
> You won't be able to run -j and get the parallel execution that you would with an external tool.
>
> -Bill
>
> On Wed, Jan 2, 2013 at 1:29 AM, Philipp Kraus <philipp.kraus at flashpixx.de> wrote:
> Thanks for this interessting link. I will take a look :-)
> A Scons-only way should be nice, because I need only "one-install-tool"
> for checking, so IMHO it can be a solution to migrate the external checking stuff
> into a Scons builder.
>
> Thanks a lot
>
> Phil
>
>
> Am 02.01.2013 um 10:13 schrieb Jos De Laender:
>
> > It's off course off-topic (except for the I like Scons part ;)) but I feel like you are re-inventing the wheel.
> > If it was my problem, I went for : http://uncrustify.sourceforge.net/ .
> > GUI ànd command-line that should be possible to integrate with Scons.
> >
> > Jos
> >
> > On 02-01-13 09:26, Philipp Kraus wrote:
> >> Hello,
> >>
> >> I need some ideas for the following problem: I use Scons for building C/C++ programs& shared libraries, but at the moment I would like to define a style guide of the code structure eg new line at the end of each file, camel-case naming etc
> >> I have searched for a tool, which support custom rules for define a style and checks my code base again these rules. I have found a Python script for the Google C++ Style Guide and this is a nice solution, but it does not support custom rules or changing defined rules.
> >>
> >> I love Scons and I have written some builders& emitters, so at the moment I would like to implementate an own style guide checker with Scons. I prefere a flexible definition of the rule set and configuration option, so the check
> >> should be create warning and exceptions. I think regular expressions are a good choice of beginning.
> >> The Scons emitter should be do nothing (input is equal to output) and the builder should run the checks, but the builder does not create any new file, so the input file should be the output file, does it?
> >>
> >> Does anybody know any helpfull tips or ideas?
> >>
> >> Thanks
> >>
> >> Phil
> >> _______________________________________________
> >> Scons-users mailing list
> >> Scons-users at scons.org
> >> http://four.pairlist.net/mailman/listinfo/scons-users
> >>
> >>
> >
> >
> > --
> > Jos De Laender
> > www.jodela.be
> >
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130102/c2f0cfe4/attachment.htm>
More information about the Scons-users
mailing list