| OLD | NEW |
| 1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
| 4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
| 5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
| 6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
| 7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
| 8 | 8 |
| 9 import json | 9 import json |
| 10 import os | 10 import os |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 depot_tools/presubmit_canned_checks.py but has less filters and only checks | 61 depot_tools/presubmit_canned_checks.py but has less filters and only checks |
| 62 added files.""" | 62 added files.""" |
| 63 result = [] | 63 result = [] |
| 64 | 64 |
| 65 # Initialize cpplint. | 65 # Initialize cpplint. |
| 66 import cpplint | 66 import cpplint |
| 67 # Access to a protected member _XX of a client class | 67 # Access to a protected member _XX of a client class |
| 68 # pylint: disable=W0212 | 68 # pylint: disable=W0212 |
| 69 cpplint._cpplint_state.ResetErrorCounts() | 69 cpplint._cpplint_state.ResetErrorCounts() |
| 70 | 70 |
| 71 # Justifications for each filter: | |
| 72 # | |
| 73 # - build/header_guard : WebRTC coding style says they should be prefixed | |
| 74 # with WEBRTC_, which is not possible to configure in | |
| 75 # cpplint.py. | |
| 76 cpplint._SetFilters('-build/header_guard') | |
| 77 | |
| 78 # Use the strictest verbosity level for cpplint.py (level 1) which is the | 71 # Use the strictest verbosity level for cpplint.py (level 1) which is the |
| 79 # default when running cpplint.py from command line. | 72 # default when running cpplint.py from command line. |
| 80 # To make it possible to work with not-yet-converted code, we're only applying | 73 # To make it possible to work with not-yet-converted code, we're only applying |
| 81 # it to new (or moved/renamed) files and files listed in LINT_FOLDERS. | 74 # it to new (or moved/renamed) files and files listed in LINT_FOLDERS. |
| 82 verbosity_level = 1 | 75 verbosity_level = 1 |
| 83 files = [] | 76 files = [] |
| 84 for f in input_api.AffectedSourceFiles(source_file_filter): | 77 for f in input_api.AffectedSourceFiles(source_file_filter): |
| 85 # Note that moved/renamed files also count as added. | 78 # Note that moved/renamed files also count as added. |
| 86 if f.Action() == 'A': | 79 if f.Action() == 'A': |
| 87 files.append(f.AbsoluteLocalPath()) | 80 files.append(f.AbsoluteLocalPath()) |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 for builder in masters[master]: | 349 for builder in masters[master]: |
| 357 if 'presubmit' in builder: | 350 if 'presubmit' in builder: |
| 358 # Do not trigger presubmit builders, since they're likely to fail | 351 # Do not trigger presubmit builders, since they're likely to fail |
| 359 # (e.g. OWNERS checks before finished code review), and we're running | 352 # (e.g. OWNERS checks before finished code review), and we're running |
| 360 # local presubmit anyway. | 353 # local presubmit anyway. |
| 361 pass | 354 pass |
| 362 else: | 355 else: |
| 363 try_config[master][builder] = ['defaulttests'] | 356 try_config[master][builder] = ['defaulttests'] |
| 364 | 357 |
| 365 return try_config | 358 return try_config |
| OLD | NEW |