mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 13:50:40 +01:00
Make lint errors fatal in presubmit and fix files in whitelisted paths
BUG=webrtc:5149 Review-Url: https://codereview.webrtc.org/2762963002 Cr-Commit-Position: refs/heads/master@{#17323}
This commit is contained in:
parent
92e448d529
commit
8e58d65ddf
6 changed files with 11 additions and 13 deletions
|
@ -255,9 +255,7 @@ def _CheckApprovedFilesLintClean(input_api, output_api,
|
|||
|
||||
if cpplint._cpplint_state.error_count > 0:
|
||||
if input_api.is_committing:
|
||||
# TODO(kjellander): Change back to PresubmitError below when we're
|
||||
# confident with the lint settings.
|
||||
res_type = output_api.PresubmitPromptWarning
|
||||
res_type = output_api.PresubmitError
|
||||
else:
|
||||
res_type = output_api.PresubmitPromptWarning
|
||||
result = [res_type('Changelist failed cpplint.py check.')]
|
||||
|
|
|
@ -203,7 +203,7 @@ class RTCErrorOr {
|
|||
// is marked 'explicit' to try to catch cases like 'return {};', where people
|
||||
// think RTCErrorOr<std::vector<int>> will be initialized with an empty
|
||||
// vector, instead of a RTCErrorType::INTERNAL_ERROR error.
|
||||
explicit RTCErrorOr() : error_(RTCErrorType::INTERNAL_ERROR) {}
|
||||
RTCErrorOr() : error_(RTCErrorType::INTERNAL_ERROR) {}
|
||||
|
||||
// Constructs a new RTCErrorOr with the given non-ok error. After calling
|
||||
// this constructor, calls to value() will DCHECK-fail.
|
||||
|
@ -213,7 +213,7 @@ class RTCErrorOr {
|
|||
// RTCError(...)' when the return type is RTCErrorOr<T>.
|
||||
//
|
||||
// REQUIRES: !error.ok(). This requirement is DCHECKed.
|
||||
RTCErrorOr(RTCError&& error) : error_(std::move(error)) {
|
||||
RTCErrorOr(RTCError&& error) : error_(std::move(error)) { // NOLINT
|
||||
RTC_DCHECK(!error.ok());
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,7 @@ class RTCErrorOr {
|
|||
// NOTE: Not explicit - we want to use RTCErrorOr<T> as a return type
|
||||
// so it is convenient and sensible to be able to do 'return T()'
|
||||
// when the return type is RTCErrorOr<T>.
|
||||
RTCErrorOr(T&& value) : value_(std::move(value)) {}
|
||||
RTCErrorOr(T&& value) : value_(std::move(value)) {} // NOLINT
|
||||
|
||||
// Delete the copy constructor and assignment operator; there aren't any use
|
||||
// cases where you should need to copy an RTCErrorOr, as opposed to moving
|
||||
|
@ -248,7 +248,7 @@ class RTCErrorOr {
|
|||
// Conversion constructor and assignment operator; T must be copy or move
|
||||
// constructible from U.
|
||||
template <typename U>
|
||||
RTCErrorOr(RTCErrorOr<U> other)
|
||||
RTCErrorOr(RTCErrorOr<U> other) // NOLINT
|
||||
: error_(std::move(other.error_)), value_(std::move(other.value_)) {}
|
||||
template <typename U>
|
||||
RTCErrorOr& operator=(RTCErrorOr<U> other) {
|
||||
|
|
|
@ -66,10 +66,10 @@ TEST_P(BweSimulation, Verizon4gDownlinkTest) {
|
|||
AdaptiveVideoSource source(0, 30, 300, 0, 0);
|
||||
VideoSender sender(&downlink_, &source, GetParam());
|
||||
RateCounterFilter counter1(&downlink_, 0, "sender_output",
|
||||
bwe_names[GetParam()] + "_up");
|
||||
std::string() + bwe_names[GetParam()] + "_up");
|
||||
TraceBasedDeliveryFilter filter(&downlink_, 0, "link_capacity");
|
||||
RateCounterFilter counter2(&downlink_, 0, "Receiver",
|
||||
bwe_names[GetParam()] + "_down");
|
||||
std::string() + bwe_names[GetParam()] + "_down");
|
||||
PacketReceiver receiver(&downlink_, 0, GetParam(), true, true);
|
||||
ASSERT_TRUE(filter.Init(test::ResourcePath("verizon4g-downlink", "rx")));
|
||||
RunFor(22 * 60 * 1000);
|
||||
|
|
|
@ -180,7 +180,7 @@ enum BandwidthEstimatorType {
|
|||
kTcpEstimator
|
||||
};
|
||||
|
||||
const std::string bwe_names[] = {"Null", "NADA", "REMB", "GCC", "TCP"};
|
||||
const char* const bwe_names[] = {"Null", "NADA", "REMB", "GCC", "TCP"};
|
||||
|
||||
int64_t GetAbsSendTimeInMs(uint32_t abs_send_time);
|
||||
|
||||
|
|
|
@ -769,7 +769,8 @@ void BweTest::RunLongTcpFairness(BandwidthEstimatorType bwe_type) {
|
|||
// max_delay_ms = 1000;
|
||||
|
||||
std::string title("5.6_Long_TCP_Fairness");
|
||||
std::string flow_name(bwe_names[bwe_type] + 'x' + bwe_names[kTcpEstimator]);
|
||||
std::string flow_name = std::string() +
|
||||
bwe_names[bwe_type] + 'x' + bwe_names[kTcpEstimator];
|
||||
|
||||
RunFairnessTest(bwe_type, kNumRmcatFlows, kNumTcpFlows, kRunTimeS,
|
||||
kCapacityKbps, max_delay_ms, rtt_ms, kMaxJitterMs, kOffSetsMs,
|
||||
|
|
|
@ -11,10 +11,9 @@
|
|||
#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_MOCK_MOCK_PACKET_MANIPULATOR_H_
|
||||
#define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_MOCK_MOCK_PACKET_MANIPULATOR_H_
|
||||
|
||||
#include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h"
|
||||
#include "webrtc/test/gmock.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
#include "webrtc/video_frame.h"
|
||||
|
|
Loading…
Reference in a new issue