= A plugin for displaying code tags (`XXX`, `FIXME`, `TODO`, etc.) = Blog posting [http://trac.pocoo.org/wiki/blog/2006/06/06/00.04 here], Demo [http://trac.pocoo.org/codetags here], [http://trac.pocoo.org/repos/sandbox/codetags-plugin/ SVN repository]. Since I cannot find any documentation directly I just wanted to tell you people that you need a subdirectory named cache thats writeable by your trac to make this working. Oh and dont wonder that it takes so much time the first time used ;) To enable in the trac.ini: {{{ [components] codetags.* = enabled }}} By default, this plugin doesn't ignore binary files. If you use svn/trac in a web-dev environment, this is a pain, since the tagger finds tags in files such as `.gif`. User submitted patch seems to work: http://trac.pocoo.org/attachment/ticket/109/diff.txt Additional configuration information in trac.ini: {{{ [code-tags] scan_files = *.html, *.py, *.c, *.h, *.hh, *.m, *.pch, *.hpp scan_folders = trunk/*, branches/* tags = XXX, TODO, FIXME, BUG }}} {{{scan_files}}} allows you to define specific file types to scan (default: *) [[br]] {{{scan_folders}}} specifies which directories within the repository to scan (default: *) [[br]] {{{tags}}} allows you to specify what tags to locate, though only the defaults are colored at all. (default: XXX, TODO, FIXME) [[br]] Given the configuration options, I feel that the above referenced patch is unneeded if you have configured properly. On the other hand, there are legitimate uses for long strings of XXX's without them being a code tag. A simple one line change in indexer.py would eliminate 99% of XXX tags that were unintentional by requiring them to end with a colon: {{{ #!diff Index: indexer.py =================================================================== --- indexer.py (revision 2368) +++ indexer.py (working copy) @@ -27,7 +27,7 @@ p = [] for word in self.tags: - p.append(re.escape(word)) + p.append(re.escape(word + ':')) self.tag_re = re.compile(r'(%s)\:?\s*(.*?)\s*$' % '|'.join(p)) cdir = os.path.join(os.path.abspath(env.path), 'cache', 'codetags') }}}