开发者

Automatically generate TFS Work Item(s) from Klocwork Insight run

we consider to use Klocwork Insight for code analysis in the near future and are just migrating our source to Team Foundation Server 2010.

Is it possible to tell Klocwork to create Work Items for issues found? Or would I need to create a script that would do this?

TFS 2010 is listed as "Supported software configuration management (SCM) system for Klocwork Inspect", but this may only refer to the ability to get the code form TFS. S开发者_高级运维adly, the site does not elaborate any further.

Any ideas on this topic? Thanks in advance.

[EDIT] To elaborate:

After going productive on TFS there will probably be an initial phase of just getting the Workspace to the Klocwork Server and running Klocwork separately, having only its own IDE for processing its output. For big issues we'll have to manually create WIs, just as we do now (with another issue tool).

Soon after that, we'll probably include Klocwork into the Build Workflow for our weekly build, so TFS will be aware of its exit state at the least. I guess then TFS can create a WI if Klocwork "fails", but can it create, say, one WI for each issue of severency x and above or with a specific ID?


Without great knowledge of Klocwork (I had some minor experience in another job, but it was a UX universe - so my experience is probably not even relevant) I 'd say this should be possible with TFS.

If you plan to use your code analyzer as part of your build, then this is trivial since you 'll be able to delegate the work item(s) generation to the TFS build. The only prerequisite is that Klocwork can run as a console application.

If you 'd like to use it separately, there are two possibilities: (1) Either Klocwork itself is integrated with TFS & can generate the items you like on it's own, or (2) It isn't and you 'll have to create your WIs programatically.

I can support you with either option provided you elaborate on which variant you focus.

[Our code analyzer runs as a part of the build in TFS, in the older job I had Klocworks was a part of the build as well.]

EDIT (based on the comments below)
It should probably be no problem to invoke Klocworks with an "InvokeProcess" activity & catch it's resulting exit code. If it then equals a 'fail', it's really trivial to open ONE new WI using the already provided activity OpenWorkItem (here is a demonstration of its usage for a different situation)

In case you want to open multiple WIs per Build, things can get a bit more complicated: "InvokeProcess" still stands, but then you would have to parse the Klocwork output into a suitable <List>. Finally implement a foreach that contains an OpenWorkItem. The pain shall be to implement this 'parsing' within the build process template.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜