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 depot_tools. | 8 for more details about the presubmit API built into depot_tools. |
9 """ | 9 """ |
10 | 10 |
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1593 (reader mode) are ignored by the hooks as it | 1593 (reader mode) are ignored by the hooks as it |
1594 needs to be consumed by WebKit. """ | 1594 needs to be consumed by WebKit. """ |
1595 results = [] | 1595 results = [] |
1596 file_inclusion_pattern = (r".+\.css$",) | 1596 file_inclusion_pattern = (r".+\.css$",) |
1597 black_list = (_EXCLUDED_PATHS + | 1597 black_list = (_EXCLUDED_PATHS + |
1598 _TEST_CODE_EXCLUDED_PATHS + | 1598 _TEST_CODE_EXCLUDED_PATHS + |
1599 input_api.DEFAULT_BLACK_LIST + | 1599 input_api.DEFAULT_BLACK_LIST + |
1600 (r"^chrome/common/extensions/docs", | 1600 (r"^chrome/common/extensions/docs", |
1601 r"^chrome/docs", | 1601 r"^chrome/docs", |
1602 r"^components/dom_distiller/core/css/distilledpage_ios.css", | 1602 r"^components/dom_distiller/core/css/distilledpage_ios.css", |
| 1603 r"^components/flags_ui/resources/apple_flags.css", |
1603 r"^native_client_sdk")) | 1604 r"^native_client_sdk")) |
1604 file_filter = lambda f: input_api.FilterSourceFile( | 1605 file_filter = lambda f: input_api.FilterSourceFile( |
1605 f, white_list=file_inclusion_pattern, black_list=black_list) | 1606 f, white_list=file_inclusion_pattern, black_list=black_list) |
1606 for fpath in input_api.AffectedFiles(file_filter=file_filter): | 1607 for fpath in input_api.AffectedFiles(file_filter=file_filter): |
1607 for line_num, line in fpath.ChangedContents(): | 1608 for line_num, line in fpath.ChangedContents(): |
1608 for (deprecated_value, value) in _DEPRECATED_CSS: | 1609 for (deprecated_value, value) in _DEPRECATED_CSS: |
1609 if deprecated_value in line: | 1610 if deprecated_value in line: |
1610 results.append(output_api.PresubmitError( | 1611 results.append(output_api.PresubmitError( |
1611 "%s:%d: Use of deprecated CSS %s, use %s instead" % | 1612 "%s:%d: Use of deprecated CSS %s, use %s instead" % |
1612 (fpath.LocalPath(), line_num, deprecated_value, value))) | 1613 (fpath.LocalPath(), line_num, deprecated_value, value))) |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1994 for master in masters: | 1995 for master in masters: |
1995 try_config.setdefault(master, {}) | 1996 try_config.setdefault(master, {}) |
1996 for builder in masters[master]: | 1997 for builder in masters[master]: |
1997 # Do not trigger presubmit builders, since they're likely to fail | 1998 # Do not trigger presubmit builders, since they're likely to fail |
1998 # (e.g. OWNERS checks before finished code review), and we're | 1999 # (e.g. OWNERS checks before finished code review), and we're |
1999 # running local presubmit anyway. | 2000 # running local presubmit anyway. |
2000 if 'presubmit' not in builder: | 2001 if 'presubmit' not in builder: |
2001 try_config[master][builder] = ['defaulttests'] | 2002 try_config[master][builder] = ['defaulttests'] |
2002 | 2003 |
2003 return try_config | 2004 return try_config |
OLD | NEW |