It's another option.<div>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.</div>
<div><br></div><div>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.</div><div><br></div><div>Aleix<br><br><div class="gmail_quote">On Wed, Sep 29, 2010 at 4:03 PM, Milian Wolff <span dir="ltr"><<a href="mailto:mail@milianw.de">mail@milianw.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Wednesday, 29. September 2010 15:50:40 Aleix Pol wrote:<br>
> I agree it's a good one. I was thinking about it once, I think the best for<br>
> that one would be to process a regex all through the code for the TODO<br>
> comments, that way you don't need to mess with AST's and well, comments<br>
> usually are not there either so it's not something you would rely on.<br>
><br>
> So I would create a plugin that on project creation parsed all files using<br>
> some simple regex to look for what the user wants and then whenever a file<br>
> is saved it should be read again.<br>
><br>
> If you could get there I think that would be useful already and we could<br>
> still do more on that later.<br>
<br>
</div>Sorry, but I object, and greatly so. Parsing huge projects is slow _already_<br>
no need to slow it down even further by running regexps on each and every file<br>
in the project.<br>
<br>
The correct way is to do the following:<br>
<br>
- add a TODO severity to iproblem.h<br>
- write a helper function that can be run on *single* comments (not on whole<br>
documents), best place would be<br>
kdevplatform/language/duchain/stringhelpers.cpp<br>
<br>
Than use these tools in existing builders of the languages, e.g. in<br>
cpp/DeclarationBuilder::parseComments<br>
<div><div></div><div class="h5"><br>
Bye<br>
--<br>
Milian Wolff<br>
<a href="mailto:mail@milianw.de">mail@milianw.de</a><br>
<a href="http://milianw.de" target="_blank">http://milianw.de</a><br>
</div></div><br>--<br>
KDevelop-devel mailing list<br>
<a href="mailto:KDevelop-devel@kdevelop.org">KDevelop-devel@kdevelop.org</a><br>
<a href="https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel" target="_blank">https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel</a><br>
<br></blockquote></div><br></div>