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

@ -10,7 +10,6 @@ import("../../build/webrtc.gni")
source_set("rtp_rtcp") {
sources = [
# Common
"interface/fec_receiver.h",
"interface/receive_statistics.h",
"interface/remote_ntp_time_estimator.h",
@ -19,18 +18,28 @@ source_set("rtp_rtcp") {
"interface/rtp_receiver.h",
"interface/rtp_rtcp.h",
"interface/rtp_rtcp_defines.h",
"mocks/mock_rtp_rtcp.h",
"source/bitrate.cc",
"source/bitrate.h",
"source/byte_io.h",
"source/dtmf_queue.cc",
"source/dtmf_queue.h",
"source/fec_private_tables_bursty.h",
"source/fec_private_tables_random.h",
"source/fec_receiver_impl.cc",
"source/fec_receiver_impl.h",
"source/forward_error_correction.cc",
"source/forward_error_correction.h",
"source/forward_error_correction_internal.cc",
"source/forward_error_correction_internal.h",
"source/h264_sps_parser.cc",
"source/h264_sps_parser.h",
"source/mock/mock_rtp_payload_strategy.h",
"source/producer_fec.cc",
"source/producer_fec.h",
"source/receive_statistics_impl.cc",
"source/receive_statistics_impl.h",
"source/remote_ntp_time_estimator.cc",
"source/rtp_header_parser.cc",
"source/rtp_rtcp_config.h",
"source/rtp_rtcp_impl.cc",
"source/rtp_rtcp_impl.h",
"source/rtcp_packet.cc",
"source/rtcp_packet.h",
"source/rtcp_receiver.cc",
@ -41,59 +50,46 @@ source_set("rtp_rtcp") {
"source/rtcp_sender.h",
"source/rtcp_utility.cc",
"source/rtcp_utility.h",
"source/rtp_format.cc",
"source/rtp_format.h",
"source/rtp_format_h264.cc",
"source/rtp_format_h264.h",
"source/rtp_format_video_generic.cc",
"source/rtp_format_video_generic.h",
"source/rtp_format_vp8.cc",
"source/rtp_format_vp8.h",
"source/rtp_header_extension.cc",
"source/rtp_header_extension.h",
"source/rtp_header_parser.cc",
"source/rtp_packet_history.cc",
"source/rtp_packet_history.h",
"source/rtp_payload_registry.cc",
"source/rtp_receiver_audio.cc",
"source/rtp_receiver_audio.h",
"source/rtp_receiver_impl.cc",
"source/rtp_receiver_impl.h",
"source/rtp_receiver_strategy.cc",
"source/rtp_receiver_strategy.h",
"source/rtp_receiver_video.cc",
"source/rtp_receiver_video.h",
"source/rtp_rtcp_config.h",
"source/rtp_rtcp_impl.cc",
"source/rtp_rtcp_impl.h",
"source/rtp_sender.cc",
"source/rtp_sender.h",
"source/rtp_sender_audio.cc",
"source/rtp_sender_audio.h",
"source/rtp_sender_video.cc",
"source/rtp_sender_video.h",
"source/rtp_utility.cc",
"source/rtp_utility.h",
"source/ssrc_database.cc",
"source/ssrc_database.h",
"source/tmmbr_help.cc",
"source/tmmbr_help.h",
# Audio Files
"source/dtmf_queue.cc",
"source/dtmf_queue.h",
"source/rtp_receiver_audio.cc",
"source/rtp_receiver_audio.h",
"source/rtp_sender_audio.cc",
"source/rtp_sender_audio.h",
# Video Files
"source/fec_private_tables_random.h",
"source/fec_private_tables_bursty.h",
"source/forward_error_correction.cc",
"source/forward_error_correction.h",
"source/forward_error_correction_internal.cc",
"source/forward_error_correction_internal.h",
"source/h264_sps_parser.cc",
"source/h264_sps_parser.h",
"source/producer_fec.cc",
"source/producer_fec.h",
"source/rtp_packet_history.cc",
"source/rtp_packet_history.h",
"source/rtp_payload_registry.cc",
"source/rtp_receiver_strategy.cc",
"source/rtp_receiver_strategy.h",
"source/rtp_receiver_video.cc",
"source/rtp_receiver_video.h",
"source/rtp_sender_video.cc",
"source/rtp_sender_video.h",
"source/video_codec_information.h",
"source/rtp_format.cc",
"source/rtp_format.h",
"source/rtp_format_h264.cc",
"source/rtp_format_h264.h",
"source/rtp_format_vp8.cc",
"source/rtp_format_vp8.h",
"source/rtp_format_video_generic.cc",
"source/rtp_format_video_generic.h",
"source/vp8_partition_aggregator.cc",
"source/vp8_partition_aggregator.h",
# Mocks
"mocks/mock_rtp_rtcp.h",
"source/mock/mock_rtp_payload_strategy.h",
]
configs += [ "../..:common_config" ]
@ -116,6 +112,7 @@ source_set("rtp_rtcp") {
cflags = [
# TODO(jschuh): Bug 1348: fix this warning.
"/wd4267", # size_t to int truncations
# TODO(kjellander): Bug 261: fix this warning.
"/wd4373", # virtual function override.
]