New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
guard against null #1742
guard against null #1742
Conversation
Definitely an improvement; it's a shame we can't use Perhaps since our eyes are all going to get trained to glance over I might need a chance to ponder a bit; agreed we should push forward in this direction somehow though 👍 |
note that happy to name the type+method whatever u want. it could even be an extension method. so instead of |
i must admit i much prefer |
😆 yeah! I'm not so much worried about the naming as drifting from what other codebases use and what the tooling supports. E.g. in Rider I frequently add argument null checks using the
both of which would generate inconsistent code once we switch to I'd swim against the current happily if the net positive was big enough, but with some more thought, I'm not sure it adds up in this case. What do you think? |
i see your concern. two points
|
done |
Nice! I'll loop back to this shortly. I'm wondering if we could use the same approach to enforce that we only use |
it would be possible with cecil. but IMO it is reaching the point of diminishing returns |
* guard against null * Create ArgumentNullTests.cs * Update Guard.cs
No description provided.