FxCop - TFS integration : Need to create TFS bug to the last checked in person if FxCop fails

StackOverflow https://stackoverflow.com/questions/15925807

  •  03-04-2022
  •  | 
  •  

Domanda

We are in a specific requirement regarding FxCop integration with TFS2010. The requirement is as follows. - Execute the build.in specific intervals (There is already a method) - Run the FxCop after each build. (This is too simple and known) - If anything fails,need to create a TFS bug item and assign to the person who checked in the file last time.

We know that 'gated checkin' the the best way. But due to some reasons we cannot adopt that. The challenge we are facing is on the creation of the bugs against the last checked in person of each file.

Does anybody have done this type of solution before? Are there any code available public which does this?

Thanks in advance.

È stato utile?

Soluzione

It was completed by coding the whole part. The basic idea is as follows

  1. Take latest and run the exsting build script () which produce pdb as well
  2. At the end of the build script start FxCops using FxCopCmd and get the output to xml file
  3. Parse the xml and find out the xml message nodes which contains failed reviews
  4. Extract the code file path from the above xml node
  5. Map the file path to TFS path (ie c:\code to tfs path starting with $\code)
  6. Find the last checked in person's details
  7. Create and assign a bug to that person.

This was specific to our project where we cannot implement the gated checkin due to the large code base and high frequency code check ins. But had to implement automated reviews.

This can be closed

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top