Improve English language parsing of known complex policy expression patterns. #838
Labels
product: hc
Relates to the core "hc" binary
product: plugin
Relates to one or more hipcheck-maintained plugins
type: enhancement
New feature or request
Milestone
We should improve the parsing of English language policy expressions that are complex but follow a known pattern.
For example, the policy expression
(lte (count (filter (eq #t) $)) 0)
for a failed
affiliation
plugin currently parses to"Expected the number of elements in "equal to true" filtered on the repository's contributors flagged as affiliated to be less than or equal to 0"
but could say something like
"Expected the number of the repository's contributors flagged as affiliated to be less than or equal to 0"
And the policy expression
(lte (divz (count (filter (eq #f) $)) (count $)) 0.05)
for a failed
review
plugin currently parses to"Expected the number of elements in "equal to false" filtered on commits to the repo indicating review or not divided by the number of elements in commits to the repo indicating review or not to be less than or equal to 0.05"
but could say something like
"Expected the percent of commits to the repo not indicating review to be less than or equal to 0.05"
These are suggestions, and even something in between the current and suggested expressions could work.
The text was updated successfully, but these errors were encountered: