Edgewall Software

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#1292 closed enhancement (worksforme)

Ability to track specific code comments

Reported by: Cerel Owned by: Christian Boos
Priority: normal Milestone:
Component: wiki system Version:
Severity: normal Keywords: xref
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


I would want to know if there is possible to add a feature like the one I thought.

I use jEdit with a plugin "TaskList", this plugin parses the code in search of some "special comments". Comment like theese :
TODO : Something to do.
FIXME : Something that needs to be fixed.

The plugin then shows a list of all those comments with the comment and the line where it is. The problem is that those comments are not "big" enougth to create a ticket for, and then those comments are forgotten…

I think it could be fun to have a system, in Trac, to track those special comments. The system should be able to list those special comment for the whole code. Showing the comment, the file and the line. The system should also be customisable. I mean, the user should be able to add or remove some of the special comments that he doesn't use.

One "problem" with this system is how the parsing is done. We don't really need to parse the whole code each time. The parsing should only occur in the code in relation with a commit.

So, alot of code is parsed when it's added, but after, only the modified code is parsed. I think that this way, the performance impact of this parsing can be minimal.

Well, of course we still need the possibility to parse the whole code, but that parsing should only occur when a "special comment" is added to the list.

I hope you like the idea, and that it will be implemented :D.

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 15 years ago

Owner: changed from Jonas Borgström to Christian Boos
Priority: lownormal
Status: newassigned

I think something similar could be achieved using TracCrossReferences.

For that, the comments in the code, as recognized by the syntax highlighter, should be parsed.

If that would be the case, it would be enough to write the wiki page name ToDo in a comment in order to be able to retrieve that comment by looking at the BackLinks of the ToDo page.

Similarly for a FixMe page or for a plain ticket or anything else in the system…

Of course, as noted above, some care has to be taken to minimize the performance impact that this feature would certainly have:

  • first of all, make it optional
  • the source objects will be the source Trac objects, and the cross-references should be updated after each changeset:
    • Added file: parse all comments in the file and create xrefs (for the content facet)
    • Deleted path: remove all xrefs for the source objects affected
    • Copied/Moved path: copy/move the corresponding xrefs already existing
    • Modified file: delete all xrefs for the file and recreate them when parsing all the comments in the file (for the content facet)

comment:2 by Christian Boos, 15 years ago

Status: assignednew

(changing the status, as I've not actually started to work on that yet)

comment:3 by Matthew Good, 14 years ago

Resolution: worksforme
Status: newclosed

This is now supported in a plugin: th:CodeTagsPlugin

comment:4 by Christian Boos, 14 years ago

Component: generalwiki
Keywords: xref added

Note also that with the th:DoxygenPlugin, and provided you generated your doxygen docu using the GENERATE_TODOLIST configuration option set, you'll have access to a todo page collecting the references to the \todo directive.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.