-
Notifications
You must be signed in to change notification settings - Fork 2
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
New Rule: Detect when all{} should be used #14
Comments
This makes sense to me on a syntactic level. Your first example without all will fail at the first assertion failure. Since Maybe that's fine. What do you think? |
Am I correct in my understanding that the runtime complexity of the examples (assuming everything runs and is passing) is the same? If so, I think it's totally fine to run everything in an error case and produce a better, more accurate, failure message. eg, using |
Yes, but it wouldn't be correct to compel assertk users to always use
I like the idea of advertising Particular projects who care about it more could always increase the severity. |
A new rule to suggest usages of
all
would be helpful.Perhaps, given code like this, we'd get a warning to use
all
instead:I think this would be better written with all:
In this case, with
all
we'd get the evaluations forraining
andcake
even if the sky isn't blue.Maybe the rule could check for 3+ assertions on the same variable and then suggest using all instead?
The text was updated successfully, but these errors were encountered: