| 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 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1938 (reader mode) are ignored by the hooks as it | 1938 (reader mode) are ignored by the hooks as it |
| 1939 needs to be consumed by WebKit. """ | 1939 needs to be consumed by WebKit. """ |
| 1940 results = [] | 1940 results = [] |
| 1941 file_inclusion_pattern = (r".+\.css$",) | 1941 file_inclusion_pattern = (r".+\.css$",) |
| 1942 black_list = (_EXCLUDED_PATHS + | 1942 black_list = (_EXCLUDED_PATHS + |
| 1943 _TEST_CODE_EXCLUDED_PATHS + | 1943 _TEST_CODE_EXCLUDED_PATHS + |
| 1944 input_api.DEFAULT_BLACK_LIST + | 1944 input_api.DEFAULT_BLACK_LIST + |
| 1945 (r"^chrome/common/extensions/docs", | 1945 (r"^chrome/common/extensions/docs", |
| 1946 r"^chrome/docs", | 1946 r"^chrome/docs", |
| 1947 r"^components/dom_distiller/core/css/distilledpage_ios.css", | 1947 r"^components/dom_distiller/core/css/distilledpage_ios.css", |
| 1948 r"^components/flags_ui/resources/apple_flags.css", | |
| 1949 r"^components/neterror/resources/neterror.css", | 1948 r"^components/neterror/resources/neterror.css", |
| 1950 r"^native_client_sdk")) | 1949 r"^native_client_sdk")) |
| 1951 file_filter = lambda f: input_api.FilterSourceFile( | 1950 file_filter = lambda f: input_api.FilterSourceFile( |
| 1952 f, white_list=file_inclusion_pattern, black_list=black_list) | 1951 f, white_list=file_inclusion_pattern, black_list=black_list) |
| 1953 for fpath in input_api.AffectedFiles(file_filter=file_filter): | 1952 for fpath in input_api.AffectedFiles(file_filter=file_filter): |
| 1954 for line_num, line in fpath.ChangedContents(): | 1953 for line_num, line in fpath.ChangedContents(): |
| 1955 for (deprecated_value, value) in _DEPRECATED_CSS: | 1954 for (deprecated_value, value) in _DEPRECATED_CSS: |
| 1956 if deprecated_value in line: | 1955 if deprecated_value in line: |
| 1957 results.append(output_api.PresubmitError( | 1956 results.append(output_api.PresubmitError( |
| 1958 "%s:%d: Use of deprecated CSS %s, use %s instead" % | 1957 "%s:%d: Use of deprecated CSS %s, use %s instead" % |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2366 output_api, | 2365 output_api, |
| 2367 json_url='http://chromium-status.appspot.com/current?format=json')) | 2366 json_url='http://chromium-status.appspot.com/current?format=json')) |
| 2368 | 2367 |
| 2369 results.extend( | 2368 results.extend( |
| 2370 input_api.canned_checks.CheckPatchFormatted(input_api, output_api)) | 2369 input_api.canned_checks.CheckPatchFormatted(input_api, output_api)) |
| 2371 results.extend(input_api.canned_checks.CheckChangeHasBugField( | 2370 results.extend(input_api.canned_checks.CheckChangeHasBugField( |
| 2372 input_api, output_api)) | 2371 input_api, output_api)) |
| 2373 results.extend(input_api.canned_checks.CheckChangeHasDescription( | 2372 results.extend(input_api.canned_checks.CheckChangeHasDescription( |
| 2374 input_api, output_api)) | 2373 input_api, output_api)) |
| 2375 return results | 2374 return results |
| OLD | NEW |