OLD | NEW |
1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Top-level presubmit script for Chromium. | 5 """Top-level presubmit script for Chromium. |
6 | 6 |
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
8 for more details about the presubmit API built into gcl. | 8 for more details about the presubmit API built into gcl. |
9 """ | 9 """ |
10 | 10 |
11 _EXCLUDED_PATHS = ( | 11 _EXCLUDED_PATHS = ( |
12 r"breakpad[\\\/].*", | 12 r"breakpad[\\\/].*", |
13 r"skia[\\\/].*", | 13 r"skia[\\\/].*", |
14 r"v8[\\\/].*", | 14 r"v8[\\\/].*", |
15 ) | 15 ) |
16 | 16 |
17 _TEXT_FILES = ( | 17 _TEXT_FILES = ( |
18 r".*\.txt", | 18 r".*\.txt", |
19 r".*\.json", | 19 r".*\.json", |
20 ) | 20 ) |
21 | 21 |
22 _LICENSE_HEADER = ( | 22 _LICENSE_HEADER = ( |
23 r".*? Copyright \(c\) 20\d\d The Chromium Authors\. All rights reserved\." | 23 r".*? Copyright \(c\) 20[0-9\-]{2,7} The Chromium Authors\. All rights " |
24 "\n" | 24 r"reserved\." "\n" |
25 r".*? Use of this source code is governed by a BSD-style license that can " | 25 r".*? Use of this source code is governed by a BSD-style license that can " |
26 "be\n" | 26 "be\n" |
27 r".*? found in the LICENSE file\." | 27 r".*? found in the LICENSE file\." |
28 "\n" | 28 "\n" |
29 ) | 29 ) |
30 | 30 |
31 | 31 |
32 def _CommonChecks(input_api, output_api): | 32 def _CommonChecks(input_api, output_api): |
33 results = [] | 33 results = [] |
34 # What does this code do? | 34 # What does this code do? |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 'builds are pending.' % max_pendings, | 204 'builds are pending.' % max_pendings, |
205 long_text='\n'.join(out))] | 205 long_text='\n'.join(out))] |
206 except IOError: | 206 except IOError: |
207 # Silently pass. | 207 # Silently pass. |
208 pass | 208 pass |
209 return [] | 209 return [] |
210 | 210 |
211 | 211 |
212 def GetPreferredTrySlaves(): | 212 def GetPreferredTrySlaves(): |
213 return ['win', 'linux', 'mac'] | 213 return ['win', 'linux', 'mac'] |
OLD | NEW |