Edgewall Software

Ticket #1292 (closed enhancement: worksforme)

Opened 4 years ago

Last modified 2 years ago

Ability to track specific code comments

Reported by: Cerel Owned by: cboos
Priority: normal Milestone:
Component: wiki system Version:
Severity: normal Keywords: xref
Cc:

Description

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

Change History

Changed 3 years ago by cboos

  • owner changed from jonas to cboos
  • priority changed from low to normal
  • status changed from new to assigned

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)

Changed 3 years ago by cboos

  • status changed from assigned to new

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

Changed 2 years ago by mgood

  • status changed from new to closed
  • resolution set to worksforme

This is now supported in a plugin: th:CodeTagsPlugin

Changed 2 years ago by cboos

  • keywords xref added
  • component changed from general to wiki

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.

Add/Change #1292 (Ability to track specific code comments)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.