The error message says:
UMA_HISTOGRAM_ENUMERATION reports in src/media/ are expected to adhere
to the following guidelines:
- The max value (3rd argument) should be an enum value equal to the
last valid value, e.g. FOO_MAX = LAST_VALID_FOO.
- 1 must be added to that max value.
This is not clear at all:
Should it be equal to the last valid value and max value + 1 at the same time? Are "last" value and "max" value the same? Should I have both?
And it is not correct as well:
It says "e.g. FOO_MAX = LAST_VALID_FOO", which is "for example" - but it fact it should literally contain "MAX" or "Max" in the name
https://cs.chromium.org/chromium/src/media/PRESUBMIT.py?type=cs&q=%22hould+be+an+enum+value+equal+to%22&sq=package:chromium&l=105
Which is a strange restriction: a lot of enums end up with ".._LAST", and others with "..._COUNT" (which is already +1).
(Also, I wonder how it works if I have a enum like { kMin, kMax, kMiddle }, for example)
Comment 1 by sheriffbot@chromium.org
, Apr 2 2018Owner: ----
Status: Untriaged (was: Assigned)