| 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 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1636 return [output_api.PresubmitPromptWarning( | 1636 return [output_api.PresubmitPromptWarning( |
| 1637 _IPC_ENUM_TRAITS_DEPRECATED, problems)] | 1637 _IPC_ENUM_TRAITS_DEPRECATED, problems)] |
| 1638 else: | 1638 else: |
| 1639 return [] | 1639 return [] |
| 1640 | 1640 |
| 1641 | 1641 |
| 1642 def _CheckForWindowsLineEndings(input_api, output_api): | 1642 def _CheckForWindowsLineEndings(input_api, output_api): |
| 1643 """Check source code and known ascii text files for Windows style line | 1643 """Check source code and known ascii text files for Windows style line |
| 1644 endings. | 1644 endings. |
| 1645 """ | 1645 """ |
| 1646 known_text_files = r'.*\.(txt|html|htm|mhtml|py)$' | 1646 known_text_files = r'.*\.(txt|html|htm|mhtml|py|gyp|gypi|gn|isolate)$' |
| 1647 | 1647 |
| 1648 file_inclusion_pattern = ( | 1648 file_inclusion_pattern = ( |
| 1649 known_text_files, | 1649 known_text_files, |
| 1650 r'.+%s' % _IMPLEMENTATION_EXTENSIONS | 1650 r'.+%s' % _IMPLEMENTATION_EXTENSIONS |
| 1651 ) | 1651 ) |
| 1652 | 1652 |
| 1653 filter = lambda f: input_api.FilterSourceFile( | 1653 filter = lambda f: input_api.FilterSourceFile( |
| 1654 f, white_list=file_inclusion_pattern, black_list=None) | 1654 f, white_list=file_inclusion_pattern, black_list=None) |
| 1655 files = [f.LocalPath() for f in | 1655 files = [f.LocalPath() for f in |
| 1656 input_api.AffectedSourceFiles(filter)] | 1656 input_api.AffectedSourceFiles(filter)] |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1757 # Explicitly iterate over copies of dicts since we mutate them. | 1757 # Explicitly iterate over copies of dicts since we mutate them. |
| 1758 for master in builders.keys(): | 1758 for master in builders.keys(): |
| 1759 for builder in builders[master].keys(): | 1759 for builder in builders[master].keys(): |
| 1760 # Do not trigger presubmit builders, since they're likely to fail | 1760 # Do not trigger presubmit builders, since they're likely to fail |
| 1761 # (e.g. OWNERS checks before finished code review), and we're | 1761 # (e.g. OWNERS checks before finished code review), and we're |
| 1762 # running local presubmit anyway. | 1762 # running local presubmit anyway. |
| 1763 if 'presubmit' in builder: | 1763 if 'presubmit' in builder: |
| 1764 builders[master].pop(builder) | 1764 builders[master].pop(builder) |
| 1765 | 1765 |
| 1766 return builders | 1766 return builders |
| OLD | NEW |