| 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 13 matching lines...) Expand all  Loading... | 
| 24   'webrtc/modules/pacing', | 24   'webrtc/modules/pacing', | 
| 25   'webrtc/modules/remote_bitrate_estimator', | 25   'webrtc/modules/remote_bitrate_estimator', | 
| 26   'webrtc/modules/rtp_rtcp', | 26   'webrtc/modules/rtp_rtcp', | 
| 27   'webrtc/modules/video_coding', | 27   'webrtc/modules/video_coding', | 
| 28   'webrtc/modules/video_processing', | 28   'webrtc/modules/video_processing', | 
| 29   'webrtc/sound', | 29   'webrtc/sound', | 
| 30   'webrtc/tools', | 30   'webrtc/tools', | 
| 31   'webrtc/video', | 31   'webrtc/video', | 
| 32 ] | 32 ] | 
| 33 | 33 | 
|  | 34 # These filters will always be removed, even if the caller specifies a filter | 
|  | 35 # set, as they are problematic or broken in some way. | 
|  | 36 # | 
|  | 37 # Justifications for each filter: | 
|  | 38 # - build/c++11         : Rvalue ref checks are unreliable (false positives), | 
|  | 39 #                         include file and feature blacklists are | 
|  | 40 #                         google3-specific. | 
|  | 41 BLACKLIST_LINT_FILTERS = [ | 
|  | 42   '-build/c++11', | 
|  | 43 ] | 
|  | 44 | 
| 34 # List of directories of "supported" native APIs. That means changes to headers | 45 # List of directories of "supported" native APIs. That means changes to headers | 
| 35 # will be done in a compatible way following this scheme: | 46 # will be done in a compatible way following this scheme: | 
| 36 # 1. Non-breaking changes are made. | 47 # 1. Non-breaking changes are made. | 
| 37 # 2. The old APIs as marked as deprecated (with comments). | 48 # 2. The old APIs as marked as deprecated (with comments). | 
| 38 # 3. Deprecation is announced to discuss-webrtc@googlegroups.com and | 49 # 3. Deprecation is announced to discuss-webrtc@googlegroups.com and | 
| 39 #    webrtc-users@google.com (internal list). | 50 #    webrtc-users@google.com (internal list). | 
| 40 # 4. (later) The deprecated APIs are removed. | 51 # 4. (later) The deprecated APIs are removed. | 
| 41 # Directories marked as DEPRECATED should not be used. They're only present in | 52 # Directories marked as DEPRECATED should not be used. They're only present in | 
| 42 # the list to support legacy downstream code. | 53 # the list to support legacy downstream code. | 
| 43 NATIVE_API_DIRS = ( | 54 NATIVE_API_DIRS = ( | 
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 165   depot_tools/presubmit_canned_checks.py but has less filters and only checks | 176   depot_tools/presubmit_canned_checks.py but has less filters and only checks | 
| 166   added files.""" | 177   added files.""" | 
| 167   result = [] | 178   result = [] | 
| 168 | 179 | 
| 169   # Initialize cpplint. | 180   # Initialize cpplint. | 
| 170   import cpplint | 181   import cpplint | 
| 171   # Access to a protected member _XX of a client class | 182   # Access to a protected member _XX of a client class | 
| 172   # pylint: disable=W0212 | 183   # pylint: disable=W0212 | 
| 173   cpplint._cpplint_state.ResetErrorCounts() | 184   cpplint._cpplint_state.ResetErrorCounts() | 
| 174 | 185 | 
|  | 186   lint_filters = cpplint._Filters() | 
|  | 187   lint_filters.extend(BLACKLIST_LINT_FILTERS) | 
|  | 188   cpplint._SetFilters(','.join(lint_filters)) | 
|  | 189 | 
| 175   # Create a platform independent whitelist for the CPPLINT_DIRS. | 190   # Create a platform independent whitelist for the CPPLINT_DIRS. | 
| 176   whitelist_dirs = [input_api.os_path.join(*path.split('/')) | 191   whitelist_dirs = [input_api.os_path.join(*path.split('/')) | 
| 177                     for path in CPPLINT_DIRS] | 192                     for path in CPPLINT_DIRS] | 
| 178 | 193 | 
| 179   # Use the strictest verbosity level for cpplint.py (level 1) which is the | 194   # Use the strictest verbosity level for cpplint.py (level 1) which is the | 
| 180   # default when running cpplint.py from command line. | 195   # default when running cpplint.py from command line. | 
| 181   # To make it possible to work with not-yet-converted code, we're only applying | 196   # To make it possible to work with not-yet-converted code, we're only applying | 
| 182   # it to new (or moved/renamed) files and files listed in LINT_FOLDERS. | 197   # it to new (or moved/renamed) files and files listed in LINT_FOLDERS. | 
| 183   verbosity_level = 1 | 198   verbosity_level = 1 | 
| 184   files = [] | 199   files = [] | 
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 495     for builder in masters[master]: | 510     for builder in masters[master]: | 
| 496       if 'presubmit' in builder: | 511       if 'presubmit' in builder: | 
| 497         # Do not trigger presubmit builders, since they're likely to fail | 512         # Do not trigger presubmit builders, since they're likely to fail | 
| 498         # (e.g. OWNERS checks before finished code review), and we're running | 513         # (e.g. OWNERS checks before finished code review), and we're running | 
| 499         # local presubmit anyway. | 514         # local presubmit anyway. | 
| 500         pass | 515         pass | 
| 501       else: | 516       else: | 
| 502         try_config[master][builder] = ['defaulttests'] | 517         try_config[master][builder] = ['defaulttests'] | 
| 503 | 518 | 
| 504   return try_config | 519   return try_config | 
| OLD | NEW | 
|---|