SubMain - CodeIt.Right The First Time!

/Community

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

Problem integrating command line exe with a build server

Last post 12-23-2008, 2:27 PM by Serge B.. 5 replies.
Sort Posts: Previous Next
  •  12-15-2008, 7:29 PM 677

    Problem integrating command line exe with a build server

    Hi, I'm testing the integration of CodeIt.Right with our TeamCity build server, which has an option to use a Command Line as a "Build Runner". However, CodeIt.Right always returns 0x0 as the result code, even if there are hundreds of violations, which TeamCity interprets as success. I want it to register as a failure if there are violations found. How can I do this?

  •  12-15-2008, 7:37 PM 678 in reply to 677

    Re: Problem integrating command line exe with a build server

    Hello,

    Can you please post the command line parameters and the return code handling piece?

    Thanks!


    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft VB MVP  |  http://vbcity.com - VB Developer Community
    » » (Static Code Analysis + Automatic Refactoring) / Painless Coding Guidelines = CodeIt.Right - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
  •  12-15-2008, 7:56 PM 679 in reply to 678

    Re: Problem integrating command line exe with a build server

    Here's the Build Log:

    [16:09:26]: Start process: "C:\Program Files\SubMain\CodeIt.Right\SubMain.CodeItRight.Cmd.exe" /Solution:X:\TeamCi~1\Projec~1\Server_WEB\Spendv~1.sln /Out:X:\out.xml
    [16:09:26]: in: C:\Program Files\TeamCity\buildAgent\work\b221b7591cee8999
    [16:09:26]: SubMain.CodeItRight.Cmd v1.0.3
    [16:09:26]: Copyright (c) 2002-2008 SubMain, a Division of vbCity.com, LLC
    [16:09:27]: ------ Parsing started: Solution: Spendv~1 ------
    [16:09:27]: Parsing...
    ...<snip>...
    [16:09:41]: ---------------------- Done ----------------------
    [16:09:41]: Analysis: 6006 violations, 0 errors
    [16:09:48]: Done.
    [16:09:48]: Process exited with code 0
    [16:09:48]: Build finished
    (not sure what you mean by the "return code handling piece" sorry)
    Thanks!
  •  12-15-2008, 11:35 PM 680 in reply to 679

    Re: Problem integrating command line exe with a build server

    Thank you for the build log.

    Current version of the console utility returns error codes when internal errors occur or 0 if analysis process completed successfully regardless whether CIR found violations or not. The resulting XML report needs to be analyzed for the violations and their number.

    We realized this doesn't work with all build process management tools and changed the command line version return codes in v1.2 - the new version returns negative codes for internal errors, 0 if no violations found and positive code equal to the number of violations found. Additionally, new version cmd line tool accepts new /severityThreshold switch.

    v1.2 is going through final testing and will be available later this week.

     


    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft VB MVP  |  http://vbcity.com - VB Developer Community
    » » (Static Code Analysis + Automatic Refactoring) / Painless Coding Guidelines = CodeIt.Right - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
  •  12-16-2008, 1:35 PM 682 in reply to 680

    Re: Problem integrating command line exe with a build server

    Thank you! I'll retest with v1.2 when it's released.
  •  12-23-2008, 2:27 PM 689 in reply to 682

    Re: Problem integrating command line exe with a build server

    Hi George,

    Version 1.2 is now available for download at http://submain.com/download/codeit.right/ 

    More details at http://submain.com/blog/ReleasedCodeItRightVersion1208357.aspx

    Please let me know what you think of the new version.

    Thanks!


    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft VB MVP  |  http://vbcity.com - VB Developer Community
    » » (Static Code Analysis + Automatic Refactoring) / Painless Coding Guidelines = CodeIt.Right - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
View as RSS news feed in XML
 
     
 
Home |  Products |  Services |  Download |  Purchase |  Support |  Community |  About Us |