-
Notifications
You must be signed in to change notification settings - Fork 46
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
Include criteria which imply the required criteria in suggest output #614
Conversation
For most consumers using exclusively the default criteria, this will only impact the output for `safe-to-run` recommendations to mention that `safe-to-deploy` would also be applicable. For consumers using more complex criteria, this may increase the size of the suggest output more substantially. This change does impact JSON output, but only for strings generally intended for human consumption. If a script was previously parsing these strings it may be broken by the change. Fixes mozilla#613
src/criteria.rs
Outdated
@@ -177,6 +177,16 @@ impl CriteriaMapper { | |||
pub fn criteria_index(&self, criteria_name: CriteriaStr<'_>) -> usize { | |||
self.index[criteria_name] | |||
} | |||
|
|||
/// Yields the indicies for all criteria which imply the the given criteria. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional nitty nit: s/the the/the/
Thanks! LGTM (although I am not sure if it counts because I am not a real owner / reviewer of this project). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good.
I'd like to bring up a complaint in the human-readable output that I've had prior to this PR. We say "recommended audits for safe-to-run (or safe-to-deploy):", however to me that sentence structure makes it sound like those are audits you need to do to meet some "safe-to-run" objective overall. This doesn't make sense in context since you should be told the criteria which the audits must meet, however it still throws me off when I read it. I think it's clearer if the wording is "recommended safe-to-run (or safe-to-deploy) audits:" or "recommended audits {meeting,satisfying} safe-to-run (or safe-to-deploy):".
Co-authored-by: Alex Franchuk <alex.franchuk@gmail.com>
For most consumers using exclusively the default criteria, this will only impact the output for
safe-to-run
recommendations to mention thatsafe-to-deploy
would also be applicable. For consumers using more complex criteria, this may increase the size of the suggest output more substantially.This change does impact JSON output, but only for strings generally intended for human consumption. If a script was previously parsing these strings it may be broken by the change.
Fixes #613