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

Side by Side Diff: PRESUBMIT.py

Issue 2737963003: Update pylintrc to catch more style violations. (Closed)
Patch Set: Added OWNERS Created 3 years, 8 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 | « OWNERS ('k') | pylintrc » ('j') | no next file with comments »
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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 r".*objc\.[hcm]+$", 519 r".*objc\.[hcm]+$",
520 r"webrtc\/build\/ios\/SDK\/.*", 520 r"webrtc\/build\/ios\/SDK\/.*",
521 ) 521 )
522 source_file_filter = lambda x: input_api.FilterSourceFile(x, None, black_list) 522 source_file_filter = lambda x: input_api.FilterSourceFile(x, None, black_list)
523 results.extend(_CheckApprovedFilesLintClean( 523 results.extend(_CheckApprovedFilesLintClean(
524 input_api, output_api, source_file_filter)) 524 input_api, output_api, source_file_filter))
525 results.extend(input_api.canned_checks.RunPylint(input_api, output_api, 525 results.extend(input_api.canned_checks.RunPylint(input_api, output_api,
526 black_list=(r'^base[\\\/].*\.py$', 526 black_list=(r'^base[\\\/].*\.py$',
527 r'^build[\\\/].*\.py$', 527 r'^build[\\\/].*\.py$',
528 r'^buildtools[\\\/].*\.py$', 528 r'^buildtools[\\\/].*\.py$',
529 r'^infra[\\\/].*\.py$',
529 r'^ios[\\\/].*\.py$', 530 r'^ios[\\\/].*\.py$',
530 r'^out.*[\\\/].*\.py$', 531 r'^out.*[\\\/].*\.py$',
531 r'^testing[\\\/].*\.py$', 532 r'^testing[\\\/].*\.py$',
532 r'^third_party[\\\/].*\.py$', 533 r'^third_party[\\\/].*\.py$',
533 r'^tools[\\\/].*\.py$', 534 r'^tools[\\\/].*\.py$',
534 # TODO(phoglund): should arguably be checked. 535 # TODO(phoglund): should arguably be checked.
535 r'^tools-webrtc[\\\/]mb[\\\/].*\.py$', 536 r'^tools-webrtc[\\\/]mb[\\\/].*\.py$',
536 r'^tools-webrtc[\\\/]valgrind[\\\/].*\.py$', 537 r'^tools-webrtc[\\\/]valgrind[\\\/].*\.py$',
537 r'^xcodebuild.*[\\\/].*\.py$',), 538 r'^xcodebuild.*[\\\/].*\.py$',),
538 disabled_warnings=['F0401', # Failed to import x
539 'E0611', # No package y in x
540 'W0232', # Class has no __init__ method
541 ],
542 pylintrc='pylintrc')) 539 pylintrc='pylintrc'))
543 540
544 # TODO(nisse): talk/ is no more, so make below checks simpler? 541 # TODO(nisse): talk/ is no more, so make below checks simpler?
545 # WebRTC can't use the presubmit_canned_checks.PanProjectChecks function since 542 # WebRTC can't use the presubmit_canned_checks.PanProjectChecks function since
546 # we need to have different license checks in talk/ and webrtc/ directories. 543 # we need to have different license checks in talk/ and webrtc/ directories.
547 # Instead, hand-picked checks are included below. 544 # Instead, hand-picked checks are included below.
548 545
549 # .m and .mm files are ObjC files. For simplicity we will consider .h files in 546 # .m and .mm files are ObjC files. For simplicity we will consider .h files in
550 # ObjC subdirectories ObjC headers. 547 # ObjC subdirectories ObjC headers.
551 objc_filter_list = (r'.+\.m$', r'.+\.mm$', r'.+objc\/.+\.h$') 548 objc_filter_list = (r'.+\.m$', r'.+\.mm$', r'.+objc\/.+\.h$')
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 input_api, output_api)) 595 input_api, output_api))
599 results.extend(input_api.canned_checks.CheckChangeHasDescription( 596 results.extend(input_api.canned_checks.CheckChangeHasDescription(
600 input_api, output_api)) 597 input_api, output_api))
601 results.extend(_CheckChangeHasBugField(input_api, output_api)) 598 results.extend(_CheckChangeHasBugField(input_api, output_api))
602 results.extend(input_api.canned_checks.CheckChangeHasTestField( 599 results.extend(input_api.canned_checks.CheckChangeHasTestField(
603 input_api, output_api)) 600 input_api, output_api))
604 results.extend(input_api.canned_checks.CheckTreeIsOpen( 601 results.extend(input_api.canned_checks.CheckTreeIsOpen(
605 input_api, output_api, 602 input_api, output_api,
606 json_url='http://webrtc-status.appspot.com/current?format=json')) 603 json_url='http://webrtc-status.appspot.com/current?format=json'))
607 return results 604 return results
OLDNEW
« no previous file with comments | « OWNERS ('k') | pylintrc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698