| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 r'^tools[\\\/]win[\\\/].*\.py$', | 285 r'^tools[\\\/]win[\\\/].*\.py$', |
| 286 r'^xcodebuild.*[\\\/].*\.py$',), | 286 r'^xcodebuild.*[\\\/].*\.py$',), |
| 287 disabled_warnings=['F0401', # Failed to import x | 287 disabled_warnings=['F0401', # Failed to import x |
| 288 'E0611', # No package y in x | 288 'E0611', # No package y in x |
| 289 'W0232', # Class has no __init__ method | 289 'W0232', # Class has no __init__ method |
| 290 ], | 290 ], |
| 291 pylintrc='pylintrc')) | 291 pylintrc='pylintrc')) |
| 292 # WebRTC can't use the presubmit_canned_checks.PanProjectChecks function since | 292 # WebRTC can't use the presubmit_canned_checks.PanProjectChecks function since |
| 293 # we need to have different license checks in talk/ and webrtc/ directories. | 293 # we need to have different license checks in talk/ and webrtc/ directories. |
| 294 # Instead, hand-picked checks are included below. | 294 # Instead, hand-picked checks are included below. |
| 295 |
| 296 # Skip long-lines check for DEPS, GN and GYP files. |
| 297 long_lines_sources = lambda x: input_api.FilterSourceFile(x, |
| 298 black_list=(r'.+\.gyp$', r'.+\.gypi$', r'.+\.gn$', r'.+\.gni$', 'DEPS')) |
| 295 results.extend(input_api.canned_checks.CheckLongLines( | 299 results.extend(input_api.canned_checks.CheckLongLines( |
| 296 input_api, output_api, maxlen=80)) | 300 input_api, output_api, maxlen=80, source_file_filter=long_lines_sources)) |
| 297 results.extend(input_api.canned_checks.CheckChangeHasNoTabs( | 301 results.extend(input_api.canned_checks.CheckChangeHasNoTabs( |
| 298 input_api, output_api)) | 302 input_api, output_api)) |
| 299 results.extend(input_api.canned_checks.CheckChangeHasNoStrayWhitespace( | 303 results.extend(input_api.canned_checks.CheckChangeHasNoStrayWhitespace( |
| 300 input_api, output_api)) | 304 input_api, output_api)) |
| 301 results.extend(input_api.canned_checks.CheckChangeTodoHasOwner( | 305 results.extend(input_api.canned_checks.CheckChangeTodoHasOwner( |
| 302 input_api, output_api)) | 306 input_api, output_api)) |
| 303 results.extend(_CheckApprovedFilesLintClean(input_api, output_api)) | 307 results.extend(_CheckApprovedFilesLintClean(input_api, output_api)) |
| 304 results.extend(_CheckNoIOStreamInHeaders(input_api, output_api)) | 308 results.extend(_CheckNoIOStreamInHeaders(input_api, output_api)) |
| 305 results.extend(_CheckNoFRIEND_TEST(input_api, output_api)) | 309 results.extend(_CheckNoFRIEND_TEST(input_api, output_api)) |
| 306 results.extend(_CheckGypChanges(input_api, output_api)) | 310 results.extend(_CheckGypChanges(input_api, output_api)) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 for builder in masters[master]: | 355 for builder in masters[master]: |
| 352 if 'presubmit' in builder: | 356 if 'presubmit' in builder: |
| 353 # Do not trigger presubmit builders, since they're likely to fail | 357 # Do not trigger presubmit builders, since they're likely to fail |
| 354 # (e.g. OWNERS checks before finished code review), and we're running | 358 # (e.g. OWNERS checks before finished code review), and we're running |
| 355 # local presubmit anyway. | 359 # local presubmit anyway. |
| 356 pass | 360 pass |
| 357 else: | 361 else: |
| 358 try_config[master][builder] = ['defaulttests'] | 362 try_config[master][builder] = ['defaulttests'] |
| 359 | 363 |
| 360 return try_config | 364 return try_config |
| OLD | NEW |