Search code examples
c#.netcode-contracts

How to auto-generate suggested requirements from Code Contracts?


Code Contracts give me a lot of suggestions from static analysis. Is there some way to auto-generate the suggestions' code (to save time on typing)?


Solution

  • No, the team did publish "Code Contracts Editor extensions" but that's all about viewing Contracts.

    As far as I know you'll have to just type them in. But start at the lower levels, a lot of information bubbles up and maybe you have to write less than it first appears.