danielwertheim / Ensure.That

Guard clause project for .NET
MIT License
439 stars 49 forks source link

Add more Resharper Annotations #48

Closed ndrwrbgs closed 6 years ago

ndrwrbgs commented 6 years ago

Not all current [NotNull]'s are annotated, we should fill in any existing gaps. Also of particular use to users would be usage of the [InvokerParameterName] which helps with auto-completion of the paramName arguments.

I'd be happy to contribute this just opening an issue for tracking

danielwertheim commented 6 years ago

Reviewed, just want to double check. In the text above you mention NotNullAttribute but there were none added. I do remember when I did the first round that there was one or two places where it was not applicable. Was that why there was none added?

ndrwrbgs commented 6 years ago

Indeed, the PR doesn't complete the first part, only the second part. Sorry, still learning how to work github 😺 Is it possible to handle the PR without closing the Issue?

There are some places it can be added - if nothing else as an attribute on the methods themselves to annotate that what it returns is not null (ValidatedNotNull says we validate the argument, but if they use the return value Resharper wouldn't know the nullability of that).

I plan to do the second part later this week (maybe today).

danielwertheim commented 6 years ago

No worries. If I merge this before the other stuff, just open a new PR.

danielwertheim commented 6 years ago

@ndrwrbgs PR #60 merged and closed. Shall I close this one or do you intend on adding NotNullAttribute some where?

danielwertheim commented 6 years ago

Closed by #72