SubMain - CodeIt.Right The First Time!

/Community

Support Community for SubMain Products
 Home Products Services Download Purchase Support
in Search
 
Home Forums Blogs Tutorials/CIR Tutorials/GD Downloads
Welcome to SubMain Community Sign in | Join | Help

Tutorials

How to integrate CodeIt.Right with TeamCity

You can integrate CodeIt.Right with TeamCity by following these steps:

1.   Download and install the CodeIt.Right Enterprise Edition.  Note that this integration only works with the Enterprise version of CodeIt.Right. 

2.   Navigate to the directory where you installed CodeIt.Right and then run SubMain.CodeItRight.Registration.exe with the following parameters (use your licensed name and license key): 

SubMain.CodeItRight.Registration.exe /user:"<user name>" /license:"<license key>" /allUsers 

The /allUsers switch registers CodeIt.Right so it can be run under any user on the TeamCity server including Local System account.

Here is complete list of command line switches if you need to run it behind a firewall:

/user or /u - Licensee name
/license or /l - License key
/allUsers or /a - Register for All Users
/proxyHost or /h - Proxy host
/proxyPort or /p - Proxy port
/proxyUserName or /s - Proxy user name
/proxyPassword or /w - Proxy password
/help or /? - Lists the command list

3.   Use CodeIt.Right Enterprise edition Team Configuration Module on another machine that has Visual Studio installed to create a custom CodeIt.Right profile.  Copy the profile to the TeamCity machine.  The profile can be found at:

        c:\Users\<user>\Documents\SubMain\CodeIt.Right Enterprise for VS20XX\Profiles\

where VS20XX is the version of Visual Studio used to run the solution.

Alternatively, you can use the Enterprise Edition profile publishing mechanism to sync the custom profile onto the TeamCity server.

4.   Add the following code to *.target MSBuild:

<UsingTask TaskName="CirBuildTask" AssemblyFile="$(ProgramFiles)\SubMain\CodeIt.Right Enterprise\SubMain.CodeItRight.MSBuild.dll" /> <Target Name="CodeItRight_CodeInspection">
<CirBuildTask Solution="<solution file path>" OutputXmlFile="$(teamcity_build_checkoutDir)\SolutionViolations.xml" OutputHtmlFile="$(teamcity_build_checkoutDir)\SolutionViolations.html" ProfileName="Custom Profile 1" />
</Target>

where SolutionViolations.xml, SolutionViolations.html are output files, and Custom Profile 1 is the user profile you created in the previous step.

5.   Create a Build Step in the project configuration.

1_BuildStep 

6.  In Project configuration -> General Settings -> Edit artifact paths add  “*.html”.

2_GeneralSettings

7.   Edit Project -> Reports Tab -> Create new report tab and confirm that Get Artifacts From contains "(last finished build)" and that Start Page contains "SolutionViolations.html". 

3_ReportTabs

8.   Run the project build and then select the CodeIt.Right Code inspection tab to see the violations report.

4_ProjectOverview

8.   Your violations report will look like this:

5_AnalysisReport

If you want to tweak the report layout visual appearance, you are able to do so by modifying XSLT stylesheet that is applied to the violation report XML output.

Published Thursday, May 9, 2013 10:33 AM by xtab

Comments

No Comments
Anonymous comments are disabled
    
 
     
 
Home |  Products |  Services |  Download |  Purchase |  Support |  Community |  About Us |