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 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1595 needs to be consumed by WebKit. """ | 1595 needs to be consumed by WebKit. """ |
1596 results = [] | 1596 results = [] |
1597 file_inclusion_pattern = (r".+\.css$",) | 1597 file_inclusion_pattern = (r".+\.css$",) |
1598 black_list = (_EXCLUDED_PATHS + | 1598 black_list = (_EXCLUDED_PATHS + |
1599 _TEST_CODE_EXCLUDED_PATHS + | 1599 _TEST_CODE_EXCLUDED_PATHS + |
1600 input_api.DEFAULT_BLACK_LIST + | 1600 input_api.DEFAULT_BLACK_LIST + |
1601 (r"^chrome/common/extensions/docs", | 1601 (r"^chrome/common/extensions/docs", |
1602 r"^chrome/docs", | 1602 r"^chrome/docs", |
1603 r"^components/dom_distiller/core/css/distilledpage_ios.css", | 1603 r"^components/dom_distiller/core/css/distilledpage_ios.css", |
1604 r"^components/flags_ui/resources/apple_flags.css", | 1604 r"^components/flags_ui/resources/apple_flags.css", |
| 1605 r"^components/neterror/resources/neterror.css", |
1605 r"^native_client_sdk")) | 1606 r"^native_client_sdk")) |
1606 file_filter = lambda f: input_api.FilterSourceFile( | 1607 file_filter = lambda f: input_api.FilterSourceFile( |
1607 f, white_list=file_inclusion_pattern, black_list=black_list) | 1608 f, white_list=file_inclusion_pattern, black_list=black_list) |
1608 for fpath in input_api.AffectedFiles(file_filter=file_filter): | 1609 for fpath in input_api.AffectedFiles(file_filter=file_filter): |
1609 for line_num, line in fpath.ChangedContents(): | 1610 for line_num, line in fpath.ChangedContents(): |
1610 for (deprecated_value, value) in _DEPRECATED_CSS: | 1611 for (deprecated_value, value) in _DEPRECATED_CSS: |
1611 if deprecated_value in line: | 1612 if deprecated_value in line: |
1612 results.append(output_api.PresubmitError( | 1613 results.append(output_api.PresubmitError( |
1613 "%s:%d: Use of deprecated CSS %s, use %s instead" % | 1614 "%s:%d: Use of deprecated CSS %s, use %s instead" % |
1614 (fpath.LocalPath(), line_num, deprecated_value, value))) | 1615 (fpath.LocalPath(), line_num, deprecated_value, value))) |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1969 results.extend(input_api.canned_checks.CheckTreeIsOpen( | 1970 results.extend(input_api.canned_checks.CheckTreeIsOpen( |
1970 input_api, | 1971 input_api, |
1971 output_api, | 1972 output_api, |
1972 json_url='http://chromium-status.appspot.com/current?format=json')) | 1973 json_url='http://chromium-status.appspot.com/current?format=json')) |
1973 | 1974 |
1974 results.extend(input_api.canned_checks.CheckChangeHasBugField( | 1975 results.extend(input_api.canned_checks.CheckChangeHasBugField( |
1975 input_api, output_api)) | 1976 input_api, output_api)) |
1976 results.extend(input_api.canned_checks.CheckChangeHasDescription( | 1977 results.extend(input_api.canned_checks.CheckChangeHasDescription( |
1977 input_api, output_api)) | 1978 input_api, output_api)) |
1978 return results | 1979 return results |
OLD | NEW |