-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fix(linter/test-consistency): display lowest version_added for arrays #5845
fix(linter/test-consistency): display lowest version_added for arrays #5845
Conversation
I don't know when this will get a proper review, but something that might help when we actually get to it: a set of before-and-after examples. I'm not completely clear on what this fixes, how it's supposed to fix it, and whether it actually does that fix. I think some examples would go a long way here. |
Sure thing! An example would be the following. In the linter's current state, the output is the following:
With this PR, the output would be the following:
|
It seems like this doesn't just change what gets displayed, but also changes what the lint is, right? Does it make the lint more strict, more lax, or just different? |
Nope, actually this only changes the display for the tests, as surprising as that may seem considering all the changes! |
Kind of a follow-up to #5833. While working on some additional versions, I realized that when a subfeature has an earlier version than its parent, the linter prints the parent version as well. However, we'd have it print "[Array]" when the parent feature has an array for support. I realize that simply printing "[Array]" is not as helpful.
The consistency linter already has a function that gets the earliest
version_added
from an array (or just theversion_added
of a single support statement), so I figured that we should hook it up to the output, removing the need to print "[Array]" at all.This PR hooks up all output of parent values with the
getVersionAdded
function, so that the earliestversion_added
in an array is printed, rather than "[Array]".