New issue
Advanced search Search tips

Issue 668527 link

Starred by 3 users

Issue metadata

Status: Untriaged
Owner: ----
EstimatedDays: ----
NextAction: 2019-07-09
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Presubmit check UMA_HISTOGRAM_ENUMERATION has unnecessary restrictions, error message is umbigulous

Project Member Reported by olka@chromium.org, Nov 24 2016

Issue description

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)
 
Project Member

Comment 1 by sheriffbot@chromium.org, Apr 2 2018

Labels: Hotlist-Recharge-BouncingOwner
Owner: ----
Status: Untriaged (was: Assigned)
The assigned owner "rileya@chromium.org" is not able to receive e-mails, please re-triage.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: Pri-3
NextAction: 2019-07-09
Downgrading P2s that haven't been modified in more than 6 months, which have no component or owner.

Sign in to add a comment