OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 |
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 original_sys_path = sys.path | 1257 original_sys_path = sys.path |
1258 try: | 1258 try: |
1259 sys.path = sys.path + [input_api.os_path.join( | 1259 sys.path = sys.path + [input_api.os_path.join( |
1260 input_api.PresubmitLocalPath(), 'tools', 'android', 'checkstyle')] | 1260 input_api.PresubmitLocalPath(), 'tools', 'android', 'checkstyle')] |
1261 import checkstyle | 1261 import checkstyle |
1262 finally: | 1262 finally: |
1263 # Restore sys.path to what it was before. | 1263 # Restore sys.path to what it was before. |
1264 sys.path = original_sys_path | 1264 sys.path = original_sys_path |
1265 | 1265 |
1266 return checkstyle.RunCheckstyle( | 1266 return checkstyle.RunCheckstyle( |
1267 input_api, output_api, 'tools/android/checkstyle/chromium-style-5.0.xml') | 1267 input_api, output_api, 'tools/android/checkstyle/chromium-style-5.0.xml', |
| 1268 black_list=_EXCLUDED_PATHS) |
1268 | 1269 |
1269 | 1270 |
1270 def _CheckForCopyrightedCode(input_api, output_api): | 1271 def _CheckForCopyrightedCode(input_api, output_api): |
1271 """Verifies that newly added code doesn't contain copyrighted material | 1272 """Verifies that newly added code doesn't contain copyrighted material |
1272 and is properly licensed under the standard Chromium license. | 1273 and is properly licensed under the standard Chromium license. |
1273 | 1274 |
1274 As there can be false positives, we maintain a whitelist file. This check | 1275 As there can be false positives, we maintain a whitelist file. This check |
1275 also verifies that the whitelist file is up to date. | 1276 also verifies that the whitelist file is up to date. |
1276 """ | 1277 """ |
1277 import sys | 1278 import sys |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1715 ] | 1716 ] |
1716 | 1717 |
1717 # Match things like path/aura/file.cc and path/file_aura.cc. | 1718 # Match things like path/aura/file.cc and path/file_aura.cc. |
1718 # Same for chromeos. | 1719 # Same for chromeos. |
1719 if any(re.search(r'[\\\/_](aura|chromeos)', f) for f in files): | 1720 if any(re.search(r'[\\\/_](aura|chromeos)', f) for f in files): |
1720 builders.extend([ | 1721 builders.extend([ |
1721 'linux_chromium_chromeos_asan_rel_ng', | 1722 'linux_chromium_chromeos_asan_rel_ng', |
1722 ]) | 1723 ]) |
1723 | 1724 |
1724 return GetDefaultTryConfigs(builders) | 1725 return GetDefaultTryConfigs(builders) |
OLD | NEW |