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

Unified Diff: tools/heapcheck/PRESUBMIT.py

Issue 7551030: Valgrind/Heapchecker: Only run presubmit check on suppression files. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 5 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
« no previous file with comments | « no previous file | tools/valgrind/memcheck/PRESUBMIT.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/heapcheck/PRESUBMIT.py
===================================================================
--- tools/heapcheck/PRESUBMIT.py (revision 94938)
+++ tools/heapcheck/PRESUBMIT.py (working copy)
@@ -7,17 +7,19 @@
for more details on the presubmit API built into gcl.
"""
+import re
+
def CheckChange(input_api, output_api):
"""Checks the heapcheck suppressions files for bad data."""
+ sup_regex = re.compile('suppressions.*\.txt$')
suppressions = {}
errors = []
check_for_heapcheck = False
skip_next_line = False
- for f in filter(lambda x: x.LocalPath().endswith('.txt'),
+ for f in filter(lambda x: sup_regex.search(x.LocalPath()),
input_api.AffectedFiles()):
for line, line_num in zip(f.NewContents(),
xrange(1, len(f.NewContents()) + 1)):
-
line = line.lstrip()
if line.startswith('#') or not line:
continue
« no previous file with comments | « no previous file | tools/valgrind/memcheck/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698