Skip to content
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

Use Is.False / Is.True instead of Is.EqualTo #824

Open
seanblue opened this issue Jan 3, 2025 · 2 comments
Open

Use Is.False / Is.True instead of Is.EqualTo #824

seanblue opened this issue Jan 3, 2025 · 2 comments
Assignees

Comments

@seanblue
Copy link

seanblue commented Jan 3, 2025

It would be helpful to have analyzers that suggest converting Is.EqualTo(false) to Is.False and Is.EqualTo(true) to Is.True. It should probably only flag this when using the false/true keywords within Is.EqualTo, not when those values are coming from variables, since the variables could be a design choice to be reused between setup and assertion.

@mikkelbu mikkelbu self-assigned this Jan 9, 2025
@seanblue
Copy link
Author

Similar analyzers could be made for Is.Null, Is.Empty, Is.Default, and Is.Zero. Should I write a new ticket for those or is it better to add those onto this one?

@manfred-brands
Copy link
Member

Some of these already exists, see #826 and #828

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants