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}
This reverts commit 4103b38350.
Reason for revert: <INSERT REASONING HERE>
Original change's 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
>
> Bug: webrtc:8366
> Change-Id: Ic5db24289e7fa461e0959f75cfbe81ecc65af4b5
> Reviewed-on: https://webrtc-review.googlesource.com/77421
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23301}
TBR=phoglund@webrtc.org,kwiberg@webrtc.org,titovartem@webrtc.org
Change-Id: Ib016ee4ac58729c2c0d302a964dbac71b4ae64af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8366
Reviewed-on: https://webrtc-review.googlesource.com/77780
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23302}
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
Bug: webrtc:8366
Change-Id: Ic5db24289e7fa461e0959f75cfbe81ecc65af4b5
Reviewed-on: https://webrtc-review.googlesource.com/77421
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23301}
Change structure of chromium owned dependencies file to JSON to
simplify work with it in different tools. Also add tool to check in
new chromium owned dep with single command like this:
./tools_webrtc/autoroller/checkin_chromium_dep.py -d <dep name>
Introduce separate file with list of webrtc owned dependencies.
Bug: webrtc:8366
Change-Id: I30a828af34cd105ce7e6bc76d6b5889e6bf7574d
Reviewed-on: https://webrtc-review.googlesource.com/76840
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23270}
This is useful when someone is just moving code around or when there is
a good reason to use public_deps.
Example of the error message:
** Presubmit ERRORS **
public_deps is discouraged in WebRTC BUILD.gn files because it doesn't
map well to downstream build systems.
Used in: BUILD.gn (line 31).
If you are not adding this code (e.g. you are just moving existing code)
or you have a good reason, you can add a comment on the line that causes
the problem:
public_deps = [ # no-presubmit-check TODO(webrtc:8603)
Bug: webrtc:8603
Change-Id: If2645b6ba60c7cbf5416450cf6e5a8c08bf4934e
Reviewed-on: https://webrtc-review.googlesource.com/75508
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23186}
It is actually fine to use streams in testonly code. This CL relaxes
the presubmit check in order allow streams usage in tests.
Bug: webrtc:8982
Change-Id: I18bbf079e804815956cd94ac761cc13022c0761e
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/61701
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#22482}
Also, manually break line to keep it less than 80 columns wide.
Bug: none
Change-Id: Iaf0118283d33e4f286b2c91996b84825afb8bda6
Notry: true
Reviewed-on: https://webrtc-review.googlesource.com/61780
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22426}
Bug: None
Change-Id: I1dd61f3363ba41ba94aa604ceac64b140fc72caa
Reviewed-on: https://webrtc-review.googlesource.com/61142
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22407}
WebRTC would like to stop using std::stringstream (in favor of
rtc::SimpleStringStream) and in order to avoid to introduce new
dependencies on it (and on other streams), this CL adds a PRESUBMIT
check.
The check will trigger anytime an #include of istream, ostream or
sstream is detected. It also ensures that new usages of types defined
in these headers are not introduced in the codebase.
Bug: webrtc:8982
Change-Id: I3e44d6a53772f25405234f10d4cf0a7209fedf99
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/60542
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22343}
Delete the subdirectory modules/media_file, and all references to it.
Bug: none
Change-Id: I19d86420a7d1d51cb6174c914a90484918106c5a
Reviewed-on: https://webrtc-review.googlesource.com/40540
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21790}
Now that voe::Channel is owned by Audio[Send|Receive]Stream, the legacy
VoiceEngine and the VoEBase interface is unused.
Also removes Atomic32, which was only used for ref counting VoiceEngine.
Bug: webrtc:4690
Change-Id: I73b8a083df544a8ab6383d57075a65ce955c592a
Reviewed-on: https://webrtc-review.googlesource.com/38723
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21595}
There is almost never a good reason to add these, so prohibit them in
the presubmit.
Bug: webrtc:6828
Change-Id: I51100574be2da755ccf5e9c25755341e46fd3a37
Reviewed-on: https://webrtc-review.googlesource.com/38861
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21574}
Now that there aren't any orphans[1], this change makes it a bit
harder to get more of them by, for instance, unlisting them from
.gn files. The previous check only covered new .h files.
The check will not catch all changes that create orphans,
such as when a file is simply dropped from a gn file. It's hard
to implement this, I believe. It should cover the major cases,
such as when a header moves between dirs.
[1] Depends on https://webrtc-review.googlesource.com/c/src/+/38200.
Bug: None
Change-Id: I6b61ea119a9ca1df6ebf381c0f5f4d8897c18b96
Reviewed-on: https://webrtc-review.googlesource.com/38220
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21544}
SDP is a detail of PeerConnection and is not used by anything in p2p, so
it belongs in the pc/ directory. This also allows
MediaContentDescription to be inlined in the future.
Bug: webrtc:8620
Change-Id: I38b65ede9942e29eb15035ab29f2be988da1e5ce
Reviewed-on: https://webrtc-review.googlesource.com/33781
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21376}
Example of an error:
** Presubmit ERRORS **
public_deps is not allowed in WebRTC BUILD.gn files because it doesn't map well to downstream build systems.
Used in: call/BUILD.gn (line 12).
Bug: webrtc:8603
Change-Id: I3b785b295ffb018cb9dfc2e14ae816d3e5e29a69
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/30262
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21224}
The listed directories are the same as in PRESUBMIT.py, which
was previously the only way to look this stuff up...
BUG=webrtc:8445
NOTRY=true
Change-Id: I218c91e554f3163ae13fc75b9cbf76b42f70624e
Reviewed-on: https://webrtc-review.googlesource.com/16432
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20670}
Enable cpplint check in the PRESUBMIT for pc/ and fix all existing
warnings.
Bug: webrtc:5583
Change-Id: If39994692ab6f6f3c83c74f23850f02fdfe810e8
Reviewed-on: https://webrtc-review.googlesource.com/16540
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20482}
Unlike all the other API directories, api/ is the root of an entire
tree of directories that are also API directories.
BUG=webrtc:8445
Change-Id: I218befe6fb6113b95599512f062ebe63abc98889
Reviewed-on: https://webrtc-review.googlesource.com/15321
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20427}
Since we migrated to Gerrit recently we cannot rely on the BUG= format
for this check because:
* it is deprecated: https://cs.chromium.org/chromium/tools/depot_tools/presubmit_support.py?l=908&rcl=94652a37677488738626b96ff504fc07afbbaa87
* it causes confusion in our users because Gerrit uses Bug: and all the error messages were requiring BUG=
This CL uses a more general API to get the list of bugs from in a CL and
renames BUG= to Bug:.
Bug: None
Change-Id: I7e86fe6d8ca426d9e4bf3bd39021d2a510ec196f
No-Treechecks: True
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/8881
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20260}
This runs `gn gen --check` with default args to detect mismatches between
#includes and dependencies in the BUILD.gn files, as well as general build
errors. Run this before uploading a CL for early detection, otherwise such
errors will cause per-platform try jobs to fail.
Bug: webrtc:8279
Change-Id: Ib87e2e3f40b8d1146ea5c1202fb113508a3f05e3
Reviewed-on: https://webrtc-review.googlesource.com/5482
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20208}
It was not producing any results on presubmit for 2 reasons:
- The list of modified GN files contained relative paths but the list
of all GN files contains absolute paths.
- The root directory was not passed to the script and the path of the
first file substituted it.
Fix potential problem with using unescaped names in a regex.
Blacklist testdata directory with intentionally bad BUILD.gn files.
NOTRY=True
Bug: webrtc:6954
Change-Id: Ib0b845b9440b594960bc8a656e8a84d2ccb4a684
Reviewed-on: https://webrtc-review.googlesource.com/5981
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20149}
This check has been skipped during the migration from src/webrtc to
src. It was also reporting false positives. Now it should be fixed.
NOTRY=True
Bug: chromium:611808
Change-Id: Id8567dd92099e75ac35351f053829deebf28a9d1
Reviewed-on: https://webrtc-review.googlesource.com/1580
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19887}