Becoming a contributor

Aleix Pol aleixpol at kde.org
Wed Sep 29 15:00:14 UTC 2010


It's another option.
The main point i proposed reading the files separatedly is because I think
that most time spent on parsing files is on duchain building instead of file
parsing itself, so that reading the files again with a regular parser should
be real fast ("wcgrep TODO" in kdevplatform takes 5.5 seconds in my system
on the first run, when it's cached it's blazingly fast, <0.1s). Also using
different regex would make it possible to gather information also from other
languages (python, bash, perl,...) where language support is not as
important as for c++ but we still might want to know about its TODO's.

Also I'm not sure we want to add Problems from the users, since they're not
problems, just issues we have to track down.

Aleix

On Wed, Sep 29, 2010 at 4:03 PM, Milian Wolff <mail at milianw.de> wrote:

> On Wednesday, 29. September 2010 15:50:40 Aleix Pol wrote:
> > I agree it's a good one. I was thinking about it once, I think the best
> for
> > that one would be to process a regex all through the code for the TODO
> > comments, that way you don't need to mess with AST's and well, comments
> > usually are not there either so it's not something you would rely on.
> >
> > So I would create a plugin that on project creation parsed all files
> using
> > some simple regex to look for what the user wants and then whenever a
> file
> > is saved it should be read again.
> >
> > If you could get there I think that would be useful already and we could
> > still do more on that later.
>
> Sorry, but I object, and greatly so. Parsing huge projects is slow
> _already_
> no need to slow it down even further by running regexps on each and every
> file
> in the project.
>
> The correct way is to do the following:
>
> - add a TODO severity to iproblem.h
> - write a helper function that can be run on *single* comments (not on
> whole
> documents), best place would be
> kdevplatform/language/duchain/stringhelpers.cpp
>
> Than use these tools in existing builders of the languages, e.g. in
> cpp/DeclarationBuilder::parseComments
>
> Bye
> --
> Milian Wolff
> mail at milianw.de
> http://milianw.de
>
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100929/584e1eed/attachment.html>


More information about the KDevelop-devel mailing list