Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Unified Diff: tools/metrics/histograms/presubmit_bad_message_reasons.py

Issue 2841823007: Fix presubmit_scheme_histograms.py and presubmit_bad_message_reasons.py (Closed)
Patch Set: Fix an old typo in _RunHistogramChecks. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/metrics/histograms/presubmit_bad_message_reasons.py
diff --git a/tools/metrics/histograms/presubmit_bad_message_reasons.py b/tools/metrics/histograms/presubmit_bad_message_reasons.py
index 0548607b15c85adf078fbde4dfaacb472386a25c..248754a87a8f04af22524f7c7063e32b9d6b6e56 100644
--- a/tools/metrics/histograms/presubmit_bad_message_reasons.py
+++ b/tools/metrics/histograms/presubmit_bad_message_reasons.py
@@ -26,13 +26,13 @@ def PrecheckBadMessage(input_api, output_api, histogram_name):
START_MARKER='^enum (class )?BadMessageReason {'
END_MARKER='^BAD_MESSAGE_MAX'
- if update_histogram_enum.HistogramNeedsUpdate(
+ presubmit_error = update_histogram_enum.CheckPresubmitErrors(
histogram_enum_name=histogram_name,
+ update_script_name='update_bad_message_reasons.py',
source_enum_path=source_path,
start_marker=START_MARKER,
- end_marker=END_MARKER):
- return [output_api.PresubmitPromptWarning(
- 'bad_messages.h has been updated but histogram.xml does not '
- 'appear to be updated.\nPlease run:\n'
- ' python tools/metrics/histograms/update_bad_message_reasons.py\n')]
+ end_marker=END_MARKER)
+ if presubmit_error:
+ return [output_api.PresubmitPromptWarning(presubmit_error,
+ items=[source_path])]
return []
« no previous file with comments | « third_party/WebKit/Source/core/frame/PRESUBMIT.py ('k') | tools/metrics/histograms/presubmit_scheme_histograms.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698