I've been using Resharper since 1.0 and all of us at works like to see "Green", however, ever since 7.0 we are having a harder time seeing "green". Why? Well after some analysis it appears that Resharper 7.0 is doing a better job at analyzing more deeply. In the past, Resharper wouldn’t analyze a function’s return value but now they do. Thus, more of our code referring (internal and from external) sources are being flagged with more issues; like: Possible Null Reference or Assign Null To Not Null are showing up all over the place.
I know that we can fix these by:
- Using // Resharper disable comments – which is getting very ugly.
- Using the annotation attributes – which we are.
- Start using Microsoft Contracts – which we are (by the way there is a bug in that Resharper don’t honor the Cod Contracts property settings, I have to add a conditional symbol of CONTRACTS_FULL to get things work. I assume this is a known bug.)
- For external source I can use Annotation.xml files – which aren’t easy to get the function signatures correct.
So here's my question; I’ve noticed that JetBrain’s has an internal tool that will analyze external assemblies and auto generate these annotationed.xml files. Can JetBrain’s provide us with a tool so that we can do the same to our external assemblies? And/or at the very least, add the ability to copy the xmldoc snip-it specifying the function signature and the required annotation to fix the warning to the clip board? This way we can add these snip-it’s to our own annotated xml files.
This would be a huge help!
IOW, as Resharper keeps doing a better job at analyzing our code, we need easier (and preferably automated) ways of annotate it.
Keep up the good work!