SergeyTeplyakov / ReSharperContractExtensions

Set of extensions for R# that simplifies Design by Contract programming using Code Contracts.
MIT License
69 stars 10 forks source link

CanBeNull / NotNull annotations support #54

Open t-denis opened 9 years ago

t-denis commented 9 years ago

Hi! What do you think about an option to automatically add CanBeNull/NotNull annotations when they are available? Like R# does with it`s default quick-fix "Check parameter for Null".

tom-englert commented 9 years ago

Good point - I was already thinking about to suggest the same feature.

Currently I have turned off R#'s notifications about null checks, but it would be great to have both CC and R# talking about the same thing. It could be like

With this used as a bulk operation it would be a piece of cake to convert a "CC only" library to support both CC and "R# only" users with proper information.

SergeyTeplyakov commented 9 years ago

@t-denis Do you mean to add something similar to current "combo" actions that adds preconditions to all nullable parameters?

@tom-englert It could be useful to have this feature that would help to sync CC and R# attributes.

t-denis commented 9 years ago

Exactly.

But the idea of processing the entire file/project/solution is also very interesting.