Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Side by Side Diff: PRESUBMIT.py

Issue 2737963003: Update pylintrc to catch more style violations. (Closed)
Patch Set: Cleanup Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pylintrc » ('j') | pylintrc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 r".*objc\.[hcm]+$", 482 r".*objc\.[hcm]+$",
483 r"webrtc\/build\/ios\/SDK\/.*", 483 r"webrtc\/build\/ios\/SDK\/.*",
484 ) 484 )
485 source_file_filter = lambda x: input_api.FilterSourceFile(x, None, black_list) 485 source_file_filter = lambda x: input_api.FilterSourceFile(x, None, black_list)
486 results.extend(_CheckApprovedFilesLintClean( 486 results.extend(_CheckApprovedFilesLintClean(
487 input_api, output_api, source_file_filter)) 487 input_api, output_api, source_file_filter))
488 results.extend(input_api.canned_checks.RunPylint(input_api, output_api, 488 results.extend(input_api.canned_checks.RunPylint(input_api, output_api,
489 black_list=(r'^base[\\\/].*\.py$', 489 black_list=(r'^base[\\\/].*\.py$',
490 r'^build[\\\/].*\.py$', 490 r'^build[\\\/].*\.py$',
491 r'^buildtools[\\\/].*\.py$', 491 r'^buildtools[\\\/].*\.py$',
492 r'^infra[\\\/].*\.py$',
492 r'^ios[\\\/].*\.py$', 493 r'^ios[\\\/].*\.py$',
493 r'^out.*[\\\/].*\.py$', 494 r'^out.*[\\\/].*\.py$',
494 r'^testing[\\\/].*\.py$', 495 r'^testing[\\\/].*\.py$',
495 r'^third_party[\\\/].*\.py$', 496 r'^third_party[\\\/].*\.py$',
496 r'^tools[\\\/].*\.py$', 497 r'^tools[\\\/].*\.py$',
497 # TODO(phoglund): should arguably be checked. 498 # TODO(phoglund): should arguably be checked.
498 r'^tools-webrtc[\\\/]mb[\\\/].*\.py$', 499 r'^tools-webrtc[\\\/]mb[\\\/].*\.py$',
499 r'^tools-webrtc[\\\/]valgrind[\\\/].*\.py$', 500 r'^tools-webrtc[\\\/]valgrind[\\\/].*\.py$',
500 r'^xcodebuild.*[\\\/].*\.py$',), 501 r'^xcodebuild.*[\\\/].*\.py$',),
501 disabled_warnings=['F0401', # Failed to import x
502 'E0611', # No package y in x
503 'W0232', # Class has no __init__ method
504 ],
505 pylintrc='pylintrc')) 502 pylintrc='pylintrc'))
506 503
507 # TODO(nisse): talk/ is no more, so make below checks simpler? 504 # TODO(nisse): talk/ is no more, so make below checks simpler?
508 # WebRTC can't use the presubmit_canned_checks.PanProjectChecks function since 505 # WebRTC can't use the presubmit_canned_checks.PanProjectChecks function since
509 # we need to have different license checks in talk/ and webrtc/ directories. 506 # we need to have different license checks in talk/ and webrtc/ directories.
510 # Instead, hand-picked checks are included below. 507 # Instead, hand-picked checks are included below.
511 508
512 # .m and .mm files are ObjC files. For simplicity we will consider .h files in 509 # .m and .mm files are ObjC files. For simplicity we will consider .h files in
513 # ObjC subdirectories ObjC headers. 510 # ObjC subdirectories ObjC headers.
514 objc_filter_list = (r'.+\.m$', r'.+\.mm$', r'.+objc\/.+\.h$') 511 objc_filter_list = (r'.+\.m$', r'.+\.mm$', r'.+objc\/.+\.h$')
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 input_api, output_api)) 557 input_api, output_api))
561 results.extend(input_api.canned_checks.CheckChangeHasDescription( 558 results.extend(input_api.canned_checks.CheckChangeHasDescription(
562 input_api, output_api)) 559 input_api, output_api))
563 results.extend(_CheckChangeHasBugField(input_api, output_api)) 560 results.extend(_CheckChangeHasBugField(input_api, output_api))
564 results.extend(input_api.canned_checks.CheckChangeHasTestField( 561 results.extend(input_api.canned_checks.CheckChangeHasTestField(
565 input_api, output_api)) 562 input_api, output_api))
566 results.extend(input_api.canned_checks.CheckTreeIsOpen( 563 results.extend(input_api.canned_checks.CheckTreeIsOpen(
567 input_api, output_api, 564 input_api, output_api,
568 json_url='http://webrtc-status.appspot.com/current?format=json')) 565 json_url='http://webrtc-status.appspot.com/current?format=json'))
569 return results 566 return results
OLDNEW
« no previous file with comments | « no previous file | pylintrc » ('j') | pylintrc » ('J')

Powered by Google App Engine
This is Rietveld 408576698