| 15 | |
| 16 | Additional configuration information in trac.ini: |
| 17 | {{{ |
| 18 | [code-tags] |
| 19 | scan_files = *.html, *.py, *.c, *.h, *.hh, *.m, *.pch, *.hpp |
| 20 | scan_folders = trunk/*, branches/* |
| 21 | tags = XXX, TODO, FIXME, BUG |
| 22 | }}} |
| 23 | |
| 24 | scan_files allows you to define specific file types to scan (default: *) |
| 25 | scan_folders specifies which directories within the repository to scan (default: *) |
| 26 | tags allows you to specify what tags to locate, though only the defaults are colored at all. (default: XXX, TODO, FIXME) |
| 27 | |
| 28 | 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: |
| 29 | |
| 30 | {{{ |
| 31 | #!diff |
| 32 | Index: indexer.py |
| 33 | =================================================================== |
| 34 | --- indexer.py (revision 2368) |
| 35 | +++ indexer.py (working copy) |
| 36 | @@ -27,7 +27,7 @@ |
| 37 | |
| 38 | p = [] |
| 39 | for word in self.tags: |
| 40 | - p.append(re.escape(word)) |
| 41 | + p.append(re.escape(word + ':')) |
| 42 | self.tag_re = re.compile(r'(%s)\:?\s*(.*?)\s*$' % '|'.join(p)) |
| 43 | |
| 44 | cdir = os.path.join(os.path.abspath(env.path), 'cache', 'codetags') |
| 45 | }}} |