[[PageOutline(2-5,Contents,pullout)]] = A plugin for displaying code tags (`XXX`, `FIXME`, `TODO`, etc.) {{{#!box warning **Notice:** This plugin used to be hosted externally and the source code is no longer reachable. }}} == Description Code tags are additions to the code or wiki pages that flag to the reader that attention is needed. * `FIXME` is for things which are definitely broken, but where you want to not worry about it for the moment. Shows up as FIXME. * `TODO` is for useful features, optimizations or refactorings that might be worth doing in the future. Shows up as TODO. * `XXX` is for things that require more thought and that are arguably broken. See [http://c2.com/cgi/wiki?FixmeComment FixmeComment]. You need a subdirectory named `cache` that's writeable by your Trac to make this work. This takes some time in the first time used. Also don't forget to grant the `CODETAGS_VIEW` permission. == Download / Source The latest CodeTagsPlugin release is [http://git.mortis.eu/git/codetags.git/snapshot/0.3.tar.gz codetags-0.3.tar.gz]. == Bugs / Known issues * When moving/deleting files with TODO tags in them, they will not disappear from the list * I've tested this and it works fine for me - rjollos 2009-08-03. * I am seeing this running Trac 0.12dev-r8983 and codetags-0.2 - aaron@irontickets.com * Running trac 0.11 (debian repo) I see this issue in codetags-0.2 - dagherad_at_gmail_dot_com (27th January 2010) * Fixed as of [http://git.mortis.eu/git/codetags.git/commit/dbae3295c4bf96313f673f01e2e1af8e3b632ba3 codetags-0.2_20100627142125] * Under 0.12 stable we got a error ''"!AttributeError: '!NoneType' object has no attribute 'youngest_rev'"'', the patch [attachment:CodeTags-0.12-get_repository.patch] fixes this problem. All Repository request should use !RepositoryManager as described in http://trac.edgewall.org/wiki/TracDev/ApiChanges/0.12 * Should be fixed with commit [http://git.mortis.eu/git/codetags.git/commit/0b0baaaa962155b445702fa7ae37e1078d4a3361 0b0baaa], as it uses the Environment's backwards-compatibility API correctly. * Does not handle multiple repositories well * if no default set, `get_repository(None)` will return `None` * Even if a default is set, it will only parse this repository * Fixed by patch [attachment:basic_multirepo_support.patch] == Feature Requests Since the tracker has no !CodeTags component I will put that here: * feature "upgrade CodeTag to issue". Click on one of the CodeTags to be brought to a "New Ticket" page, with fields already completed (will require some parsing). Bonus points if the CodeTag (and surrounding comments, which might be numerous) can optionally be removed from the SVN and a commit log entry automatically generated. * Having a huge code base makes the table with the tags so huge that even modern browsers can hardly display it. Maybe: * Split it up into multiple pages * Choose display for only specified tags * Chose display for only specified path in repository * Allowing regex's for the [code-tags] fields would increase flexibility (scan_files, scan_folders, tags). == Installation / Configuration To enable in the `trac.ini` file: {{{#!ini [components] codetags.* = enabled }}} Additional configuration options can be added to the `trac.ini` file: {{{#!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: *) {{{scan_folders}}} :: specifies which directories within the repository to scan (default: *) [[br]] {{{exclude_folders}}} :: specifies directories that are subdirectories of {{{scan_folders}}} but don't need to be scanned [[br]] {{{exclude_files}}} :: specifies files that shouldn't be scanned even though they're included by scan_files [[br]] {{{tags}}} :: allows you to specify what tags to locate, though only the defaults are colored at all. (default: XXX, TODO, FIXME) [[br]] 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`. This, however, shouldn't be a serious problem because CodeTagsPlugin plugin searches for word boundaries (regex '\b') at the edges of words.