-
Notifications
You must be signed in to change notification settings - Fork 70
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
Create analyzer/fixer for Assert.Empty #184
Conversation
@dotnet-policy-service agree |
@dotnet-policy-service agree |
This doesn't seem to work :d |
I just wanted to stop by and let you know I'm not ignoring this PR; it's just currently prioritized behind a very large v3 rework that I'm in the middle of. I will get to this, I promise. 😄 |
It's fine, but I want to make sure I don't do anything wrong. Can I work on making another PR now, specifically regarding the issue xunit/xunit#1511 ? Would it be fine? |
Functionally everything looks great. The test coverage looks succinct and complete, and the code looks simple and easy to follow. Excellent job! The only changes I'm going to push for you are coding style changes, all relatively minor and just me trying to keep things in the newer style that I want to push (a lot of older code is not up to date, so guessing what I'm typically looking for right now is probably impossible anyway). Mostly: I sorted namespaces, I restructured some of the tests so there was less redundant code (using more data-driven updates), and otherwise just made small stylistic changes. I assume you intend to do the other half here as well ( |
No, you just said before that you were working on a large rework and I started wondering if the issue is still relevant. I assume it still is. Thanks for keeping your promise of not forgetting about this PR, though :D. I might then start working on the other half in the near future, namely on the |
Sounds good! Thanks again! |
A solution to issue xunit/xunit#1510, specifically the following part:
The analyzer and fixer apply to the following situations:
Assert.Empty(Enumerable.Where(expression))
and suggest them to change to:
Assert.DoesNotContain(Enumerable, expression)
@bradwilson hope to get feedback on it, if there's anything wrong with this