Note that this will work on all platforms but is critical for windows due to the use backslash in the filesystem.
Bug: webrtc:13607
Change-Id: Ie9a9987f1382133792c85820d38b770fadc0fff5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251442
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/main@{#35982}
Example of error reporting:
Usage of assert() has been detected in the following files, please use
RTC_DCHECK() instead.
Files:
rtc_base/thread.cc
Bug: webrtc:6779
Change-Id: Iae08c3d7ddcc0449073752cadca19b3cf662892c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225549
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34532}
Currently, PRESUBMIT.py always runs pylint on all .py files when
at least one python file changes.
This helps to maintain consistency across the codebase, but
due to changes in the pylintrc rules, it has been failing for months.
Migrating all python files to the new rules can take a lot of time,
so as a workaround, for now, just run pylint on modified files.
Also, fixed or suppressed all complaints of too long lines in the
PRESUBMIT.py file to get this CL to pass the presubmit.
Bug: webrtc:12114
Change-Id: I4f6c0c269b3fe07878e168e7c90c196cb34f1d16
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220980
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34408}
The rename ensures we don't confuse this implementation with
the new one based on the new dcSCTP library.
Bug: webrtc:12614
No-Presubmit: True
Change-Id: Ida08659bbea9c98aba8247d4368799ff7dd18729
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214482
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33688}
Adding the account that performs the auto-update of the WebRTC version
string.
No-Presubmit: True
No-Try: True
Bug: webrtc:12159
Change-Id: Ie24d0de30a08bb5e21955a90059af982d019110c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197803
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32830}
After recently changing .pylintrc (see [1]) we discovered that
the presubmit check always checks all the python files when just
one python file gets updated.
This CL moves all these files one step closer to what the linter
wants.
Autogenerated with:
# Added all the files under pylint control to ~/Desktop/to-reformat
cat ~/Desktop/to-reformat | xargs sed -i '1i\\'
git cl format --python --full
This is part 1 out of 2. The second part will fix function names and
will not be automated.
[1] - https://webrtc-review.googlesource.com/c/src/+/186664
No-Presubmit: True
Bug: webrtc:12114
Change-Id: Idfec4d759f209a2090440d0af2413a1ddc01b841
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190980
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32530}
I changed stuff in test/BUILD.gn, but the suggested formatting broke
the presubmit. I tried rewriting the presubmit so it checks the
previous line as well, but that turned out to be hard.
Please try to enable this presubmit on ALL lines in a changed file.
Presubmits that only work on changed lines are really confusing.
Bug: None
Change-Id: I2386c765367681f683d82739293bc8bc8a873a7b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167926
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30420}
The new interface is called PerfTestResultWriter and is currently
implemented by PerfResultsLogger (renamed PerfTestGraphJsonWriter).
I plan to introduce a second implementation of the perf logger that
uses the new Histogram C++ API. I add a flag that chooses
between the two implementations so I can try it out (perhaps by
setting up a second, limited run of webrtc_perf_tests on the perf
bots that uses the new implementation). The histogram C++
implementation will come in the next patch.
As a side effect, I disentangled the plottable counter printer from
the perf result printer so it will work for both implementations.
The only thing they had in common was that both wrote JSON anyway.
See the bug for details on the new API.
Bug: chromium:1029452
Change-Id: Icb21b25ced08ea73aeecd221e9d51f2adf3dab1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165389
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30243}
Starting from [1], WebRTC has been migrated to std::make_unique, in
order to keep the codebase consistent, absl::make_unique is now
banned.
Output example:
** Presubmit ERRORS **
Please use std::make_unique instead of absl::make_unique.
Affected files:
call/rtp_demuxer.cc
[1] - https://webrtc-review.googlesource.com/c/src/+/153221
Bug: webrtc:10945
Change-Id: I5b727ecc5ea8ac2ecd89cbd5fba866baf6de9012
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153355
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29210}
This fixes a build error on C++17 mode due to missing #include, plus
adds a presubmit check to prevent further breakage.
Bug: chromium:752720
Change-Id: I5c7d1dca0079dfe7a042650402e6f7ae28a797ba
Reviewed-on: https://webrtc-review.googlesource.com/c/124940
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26898}
This CL makes it easy to invoke the tool for single cc files,
without having to install or configure anything.
It boils down to:
% tools_webrtc/clang_tidy.py path/to/file.cc [clang-tidy-args...]
If any issue is encountered, a colored diagnostic will be printed.
By default, it also includes checks from clang analyzer.
Warning! This is linux-only, and uses an old version of
clang-tidy based on LLVM 5.0. USE WITH CARE.
bug: webrtc:8793
Change-Id: I8964f2b939408326cc349c5f0ac0dfcff2da24c5
Reviewed-on: https://webrtc-review.googlesource.com/c/120221
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26858}
Example of an error:
** Presubmit ERRORS **
Usage of legacy GoogleTest API detected!
Please use the new API: https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature.
Affected files:
rtc_base/ssl_stream_adapter_unittest.cc (line 1459)
Bug: None
No-Try: True
Change-Id: Ibe8fbbc6c3205a266fc75afb5b59721a6b69f240
Reviewed-on: https://webrtc-review.googlesource.com/c/120924
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26562}
In the great rename of 2019, several files were renamed to snake_case.
Some of these files were referenced in PRESUBMIT.py alas, the references
were not updated.
Bug: webrtc:10159
Change-Id: I462938a1e8ea11b865d9427b40cba43fd0aab998
Reviewed-on: https://webrtc-review.googlesource.com/c/119160
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26376}
Previous attempt: https://codereview.webrtc.org/1882733006/. There
might be some benefit of having dummy encoder/decoder available in
video_loopback.
Bug: webrtc:5791
Change-Id: Iec316296754178c92b18dd3cf92f67ce6aed9439
Reviewed-on: https://webrtc-review.googlesource.com/c/112596
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26043}
This adds a presubmit check that warns missing memory.h inclusion
when a source file use absl::make_unique. That header tends to be
included transitively on pre-C++17 mode, but doesn't on C++17 mode.
Bug: chromium:752720
Change-Id: I235287f4f7407d48bfad35da86da47bc602f03ce
Reviewed-on: https://webrtc-review.googlesource.com/c/111040
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25655}
After the problem fixed by [1], it seems wiser to only check that
`include_rules` contains all the top level directories and delegate the
action of adding a rule for .cc file to the first user of an header
from a new root level directory.
This should make the presubmit check more actionable (in [1] for example
the solution was to *not* add "+ios" but to consider ios/ as a non
WebRTC directory).
[1] - https://webrtc-review.googlesource.com/c/107707
Bug: webrtc:9887, webrtc:9924
Change-Id: Ic85e2153a2b83a4874c8faec3c5d1a8c61fe6faf
Reviewed-on: https://webrtc-review.googlesource.com/c/107731
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25386}
This CL updates the checkdeps configuration for the api/ folder in
order to explicitly avoid to #include non API headers from API headers.
In order to force a careful review of potential exceptions to this
rule, the CL also adds mbonadei@ and kwiberg@ as OWNERS of api/DEPS.
Bug: webrtc:9887
Change-Id: I0ada6f1020186b2782c7d060af36079c452ba1aa
Reviewed-on: https://webrtc-review.googlesource.com/c/106800
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25338}
This presubmit check has been copied from Chromium's PRESUBMIT.py [1].
Example of the error message:
** Presubmit ERRORS **
You need LGTM from owners of depends-on paths in DEPS that were modified in this CL:
'+third_party/protobuf/src/google/protobuf',
Suggested missing target path OWNERS:
...
[1] - https://cs.chromium.org/chromium/src/PRESUBMIT.py?l=1475-1550&rcl=57cc805bba436b3f26b86168628a343be8abe2a3
Bug: webrtc:9453
Change-Id: Icc028bcd1d48b83f2f31bb821c708289eebd8623
Reviewed-on: https://webrtc-review.googlesource.com/95885
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24891}
This CL removes some assumptions that were making it difficult to
upload a patch from the directory //third_party/webrtc in a
Chromium checkout.
Bug: webrtc:9705
Change-Id: I227ca492d5cf03875474ffd4d31abf387f947e5e
Reviewed-on: https://webrtc-review.googlesource.com/97600
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24549}
Since the linux_memcheck trybot is no more, this CL removes all the
code needed to make it work.
Bug: webrtc:7737, webrtc:8356, webrtc:9570
Change-Id: I09a9467b8bf895146a3384c2c915b54662721af6
Reviewed-on: https://webrtc-review.googlesource.com/90863
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24201}
This PRESUBMIT check will ensure that WebRTC does not regress on
the amount of warning suppression flags used.
At the moment it only checks for //build/config/clang:extra_warnings.
Error message:
** Presubmit ERRORS **
Usage of //build/config/clang:extra_warnings is discouraged in WebRTC.
If you are not adding this code (e.g. you are just moving existing code) or you want to add an exception,
you can add a comment on the line that causes the problem:
"-Wno-odr" # no-presubmit-check TODO(bugs.webrtc.org/BUG_ID)
Affected files:
api/BUILD.gn (line 30)
Bug: webrtc:9251
Change-Id: I059cbc648ca6f6806cf5e936e0b83b72ec4f3f50
Reviewed-on: https://webrtc-review.googlesource.com/86942
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23831}
This goes back to using a subtree mirror of Chromium's third_party directory (managed by gclient).
The related scripts for syncing the files are also deleted.
The plan is to solve the conflict by creating third_party directories in subdirectories of WebRTC rather than the repo root.
Bug: webrtc:8366
Change-Id: I0b9f6a86c6d4075e2fa12c2db19aa54682ddb11f
Reviewed-on: https://webrtc-review.googlesource.com/85300
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23757}
Since the whole base code has been reformated,
the check based on a dry-run of `git cl format` becomes relevant.
If any formatting issue is detected, a warning will invite the user
to run `git cl format`.
Bug: webrtc:9340
Change-Id: Iabf87fd46ae8bf87d65cac92ae43e4e89b0a2796
Reviewed-on: https://webrtc-review.googlesource.com/84400
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23687}
Reland of CL https://webrtc-review.googlesource.com/c/src/+/77421
Copied description:
--
Add presubmit check for changes in 3pp
Presubmit check will test will new changes be overriden by autoroll
or not. In more details presubmit will check:
1. Each dependency in third_party have to be specified in one of:
a. THIRD_PARTY_CHROMIUM_DEPS.json
b. THIRD_PARTY_WEBRTC_DEPS.json
2. Each dependency not specified in both files from #1
3. Changes won't be overriden by chromium third_party deps autoroll:
a. Changes were made in WebRTC owned dependency
b. Changes were addition of new Chromium owned dependency
--
Also if commit message contains tag NO_AUTOIMPORT_DEPS_CHECK equal
to True, than changes in chromium specific deps will be permitted.
It is required for autoroller to be able to commit its changes and
not to fail on presubmit check.
Bug: webrtc:8366
Change-Id: I545a4778445855cf3db7cf257ca0cb63753aac06
Reviewed-on: https://webrtc-review.googlesource.com/78042
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23348}