0
votes

I currently use CC.NET to run an NAnt build file. In the NAnt script, I use the grep task to scan for TODO/BUG/HACK comments, and that report gets folded into the main build report. I'd like to know if that is something already built into TeamCity someway?

Or should I just create another build step to run the same NAnt script. If that is the case, where do I dump the results of that scan and how do I then pull that XML dump into the TeamCity build results? This is what my NAnt target looks like:

<target name="todoScan" description="Generate report on TODO items remaining in code">
    <grep output="${base.report.dir}\${projectname}_todoscan.xml" pattern="(?'Type'TODO|BUG|HACK): (?'Text'[^\n\r]*)">
       <fileset basedir="${projectdir}">
            <include name="**\*.vb" />
            <include name="**\*.js" />
            <include name="**\*.aspx" />
            <include name="**\*.ascx" />
            <exclude name="**\*-vsdoc.js" />
            <exclude name="**\jquery-1.3.2.js" />
        </fileset>
     </grep>
</target>
2

2 Answers

1
votes

I am not aware of any built-in TeamCity functionality that will perform that operation.

As long as you write the file to an accessible directory you can include it in the artifacts published using the "Artifact paths" field under "1. General Settings". The file will then be accessible from the artifacts tab on the dashboard.

If you like you can then add a new tab to the dashboard that will display your file on each build if you go to "Administration", "Server Configuration", "Report Tabs" and click "Create a new report tab".

1
votes

I was actually in the same situation, coming from Jenkins where I used a plugin to show things like IDEA/TODO/MUDO. Since I also moved to TeamCity recently, I made a plugin for this. It's very new and very basic, but does what it needs to do for me. If you're interested, it's available on GitHub: Todo TeamCity plugin.