PRESUBMIT: Improve PyLint check and add GN format check.

Add pylintrc file based on
https://code.google.com/p/chromium/codesearch#chromium/src/tools/perf/pylintrc
bit tightened up quite a bit (the one in depot_tools is far
more relaxed).

Remove a few excluded directories from pylint check and fixed/
suppressed all warnings generated.

Add GN format check + formatted all GN files using 'gn format'.
Cleanup redundant rules in tools/PRESUBMIT.py

TESTED=Ran 'git cl presubmit -vv', fixed the PyLint violations.
Ran it again with a modification in webrtc/build/webrtc.gni, formatted
all the GN files and ran it again.

R=henrika@webrtc.org, phoglund@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/50069004

Cr-Commit-Position: refs/heads/master@{#9274}
This commit is contained in:
Henrik Kjellander
2015-05-25 12:55:39 +02:00
parent 00aac5aacf
commit 57e5fd2e60
40 changed files with 299 additions and 280 deletions

View File

@ -29,9 +29,7 @@ config("rtc_base_config") {
}
config("rtc_base_chromium_config") {
defines = [
"NO_MAIN_THREAD_WRAPPING",
]
defines = [ "NO_MAIN_THREAD_WRAPPING" ]
}
config("openssl_config") {
@ -54,6 +52,7 @@ config("ios_config") {
#"Foundation.framework", # Already included in //build/config:default_libs.
"Security.framework",
"SystemConfiguration.framework",
#"UIKit.framework", # Already included in //build/config:default_libs.
]
}
@ -61,6 +60,7 @@ config("ios_config") {
config("mac_config") {
libs = [
"Cocoa.framework",
#"Foundation.framework", # Already included in //build/config:default_libs.
#"IOKit.framework", # Already included in //build/config:default_libs.
#"Security.framework", # Already included in //build/config:default_libs.
@ -79,9 +79,13 @@ if (is_linux && !build_with_chromium) {
# WebRTC cannot use as we don't sync src/crypto from Chromium.
group("linux_system_ssl") {
if (use_openssl) {
deps = [ "//third_party/boringssl" ]
deps = [
"//third_party/boringssl",
]
} else {
deps = [ "//net/third_party/nss/ssl:libssl" ]
deps = [
"//net/third_party/nss/ssl:libssl",
]
public_configs = [
"//net/third_party/nss/ssl:ssl_config",
@ -182,9 +186,7 @@ static_library("rtc_base") {
":rtc_base_config",
]
defines = [
"LOGGING=1",
]
defines = [ "LOGGING=1" ]
sources = [
"arraysize.h",
@ -348,9 +350,9 @@ static_library("rtc_base") {
public_configs += [ ":rtc_base_chromium_config" ]
} else {
sources += [
"asyncinvoker-inl.h",
"asyncinvoker.cc",
"asyncinvoker.h",
"asyncinvoker-inl.h",
"bandwidthsmoother.cc",
"bandwidthsmoother.h",
"bind.h",
@ -382,8 +384,8 @@ static_library("rtc_base") {
"refcount.h",
"referencecountedsingletonfactory.h",
"rollingaccumulator.h",
"scopedptrcollection.h",
"scoped_ref_ptr.h",
"scopedptrcollection.h",
"sec_buffer.h",
"sharedexclusivelock.cc",
"sharedexclusivelock.h",
@ -398,8 +400,8 @@ static_library("rtc_base") {
"virtualsocketserver.cc",
"virtualsocketserver.h",
"window.h",
"windowpickerfactory.h",
"windowpicker.h",
"windowpickerfactory.h",
]
deps += [ "..:webrtc_common" ]
@ -524,7 +526,7 @@ static_library("rtc_base") {
libs += [
"log",
"GLESv2"
"GLESv2",
]
}