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}
diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn
index 45b05b6..6c6c23c 100644
--- a/webrtc/BUILD.gn
+++ b/webrtc/BUILD.gn
@@ -20,13 +20,12 @@
defines += [ "WEBRTC_MOZILLA_BUILD" ]
}
if (build_with_chromium) {
- defines = [
- "WEBRTC_CHROMIUM_BUILD",
- ]
+ defines = [ "WEBRTC_CHROMIUM_BUILD" ]
include_dirs = [
# overrides must be included first as that is the mechanism for
# selecting the override headers in Chromium.
"overrides",
+
# Allow includes to be prefixed with webrtc/ in case it is not an
# immediate subdirectory of the top-level.
"..",
@@ -73,6 +72,7 @@
if (rtc_have_dbus_glib) {
defines += [ "HAVE_DBUS_GLIB" ]
+
# TODO(kjellander): Investigate this, it seems like include <dbus/dbus.h>
# is still not found even if the execution of
# build/config/linux/pkg-config.py dbus-glib-1 returns correct include
@@ -93,6 +93,7 @@
if (current_cpu != "arm64" || !is_android) {
cflags = [
"-Wextra",
+
# We need to repeat some flags from Chromium"s common.gypi
# here that get overridden by -Wextra.
"-Wno-unused-parameter",
@@ -101,6 +102,7 @@
]
cflags_cc = [
"-Wnon-virtual-dtor",
+
# This is enabled for clang; enable for gcc as well.
"-Woverloaded-virtual",
]
@@ -172,7 +174,7 @@
]
configs += [ ":common_config" ]
- public_configs = [ ":common_inherited_config"]
+ public_configs = [ ":common_inherited_config" ]
deps = [
":webrtc_common",
@@ -199,8 +201,8 @@
if (build_with_chromium) {
deps += [
- "modules/video_capture",
- "modules/video_render",
+ "modules/video_capture",
+ "modules/video_render",
]
}
}
@@ -221,8 +223,8 @@
sources = [
"common_types.cc",
"common_types.h",
- "config.h",
"config.cc",
+ "config.h",
"engine_configurations.h",
"typedefs.h",
]