Static Code Analysis - Part 4 - Creating A Work Item
[NOTE: Please log into Team System Rocks! to see the images.]
For background, please see Part 1, Part 2, and Part3 in this series of posts.
Ok, so you have run static code analysis, and it has returned some warnings for you. However, it is returning warnings in code that is not your responsibility, but someone elses. What you need to do is assign a Bug or Task work item to the appropriate person, and include the static code analysis information.
That's really easy to do. In the Error List window, select the warning(s) you want added to the work item. You can select multiple warnings by holding down the CTRL key while you make the selections. Then right-click on the selection and select Create Work Item and pick the work item type you want to create.
In my case, I'm going to select the CA1812 and CA1822 warnings, and create a Bug work item. I select both of those, right-click, and select Create Work Item->Bug. This creates a new bug work item, initially assigned to me. It gives it a default title, and copies the warning information into the History tab:
Ok, I think I've exhausted Static Code Analysis at this point. One final note: currently, there is no officially supported way to create your own static code analysis rules and add them into Team System.