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

Side by Side Diff: tools/lsan/PRESUBMIT.py

Issue 960873002: Update from https://crrev.com/318214 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « tools/clang/scripts/update.py ('k') | tools/lsan/suppressions.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """
6 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
7 for more details on the presubmit API built into depot_tools.
8 """
9
10 import re
11
12 def CheckChange(input_api, output_api):
13 errors = []
14
15 for f in input_api.AffectedFiles():
16 if not f.LocalPath().endswith('suppressions.txt'):
17 continue
18 for line_num, line in enumerate(f.NewContents()):
19 line = line.strip()
20 if line.startswith('#') or not line:
21 continue
22 if not line.startswith('leak:'):
23 errors.append('"%s" should be "leak:..." in %s line %d' %
24 (line, f.LocalPath(), line_num))
25 if errors:
26 return [output_api.PresubmitError('\n'.join(errors))]
27 return []
28
29 def CheckChangeOnUpload(input_api, output_api):
30 return CheckChange(input_api, output_api)
31
32 def CheckChangeOnCommit(input_api, output_api):
33 return CheckChange(input_api, output_api)
OLDNEW
« no previous file with comments | « tools/clang/scripts/update.py ('k') | tools/lsan/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698