Commit graph

13 commits

Author SHA1 Message Date
Peter Thatcher
4a2e0e5d45
Update to 4896 (M100) (#72) 2022-04-15 17:13:23 -06:00
Mirko Bonadei
a6395132ae Add presubmit check to guard against assert() usage.
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}
2021-07-22 17:08:26 +00:00
Mirko Bonadei
8cc6695652 Reformat python files checked by pylint (part 1/2).
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}
2020-10-30 10:13:11 +00:00
Mirko Bonadei
6c1278acd6 Inclusive language in PRESUBMIT.py.
TBR=tommi@webrtc.org

Bug: webrtc:11680
Change-Id: I8db5e3fdd087f9b4bb5b3e1baffbab6456f7ced8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179960
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31779}
2020-07-22 10:01:23 +00:00
Artem Titov
e92675b5c4 Reland: Add presubmit check for changes in 3pp
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}
2018-05-22 13:11:18 +00:00
Artem Titov
b5750eb963 Revert "Add presubmit check for changes in 3pp"
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}
2018-05-18 12:46:26 +00:00
Artem Titov
4103b38350 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}
2018-05-18 12:39:26 +00:00
Mirko Bonadei
6188018e1d Using Change.BugsFromDescription to read CL bugs in PRESUBMIT checks.
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}
2017-10-13 03:48:26 +00:00
Mirko Bonadei
4dc4e259ce Reland "Adding PRESUBMIT check to avoid mixing C, C++ and Objc-C/Obj-C++.""
This reverts commit 034a6b8a4c.

Reason for revert: Trying to fix the issue of rtc_base:rtc_base which has 2 kind of source files but in exclusive if branches.

Original change's description:
> Revert "Adding PRESUBMIT check to avoid mixing C, C++ and Objc-C/Obj-C++."
> 
> This reverts commit 0c15c5332f.
> 
> Reason for revert: This causes problems in this moment. I have to fix a target in rtc_base before landing this presubmit check.
> 
> Original change's description:
> > Adding PRESUBMIT check to avoid mixing C, C++ and Objc-C/Obj-C++.
> > 
> > The error message will be something like:
> > 
> > GN targets cannot mix .c (or .cc) and .m (or .mm) source files.
> > Please create a separate target for each collection of sources.
> > Mixed sources:
> > {
> >   BUILD_GN_PATH: [
> >     [
> >       TARGET_NAME,
> >       [
> >         SOURCES
> >       ]
> >     ],
> >     ...
> >   ],
> >   ...
> > }
> > 
> > Bug: webrtc:7743
> > Change-Id: I45dd2c621b830e5aeb081fa8d17c9497a49c2554
> > Reviewed-on: https://webrtc-review.googlesource.com/1980
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#19897}
> 
> TBR=kjellander@webrtc.org,mbonadei@webrtc.org
> 
> Change-Id: I73ff609b0140719473afd36ead1632e5cc3b41f6
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:7743
> Reviewed-on: https://webrtc-review.googlesource.com/2180
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#19898}

TBR=kjellander@webrtc.org,mbonadei@webrtc.org

Change-Id: I18dbb5a6a01ac2a184446542c29b25a3e33508ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7743
Reviewed-on: https://webrtc-review.googlesource.com/2181
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19900}
2017-09-19 14:23:00 +00:00
Mirko Bonadei
034a6b8a4c Revert "Adding PRESUBMIT check to avoid mixing C, C++ and Objc-C/Obj-C++."
This reverts commit 0c15c5332f.

Reason for revert: This causes problems in this moment. I have to fix a target in rtc_base before landing this presubmit check.

Original change's description:
> Adding PRESUBMIT check to avoid mixing C, C++ and Objc-C/Obj-C++.
> 
> The error message will be something like:
> 
> GN targets cannot mix .c (or .cc) and .m (or .mm) source files.
> Please create a separate target for each collection of sources.
> Mixed sources:
> {
>   BUILD_GN_PATH: [
>     [
>       TARGET_NAME,
>       [
>         SOURCES
>       ]
>     ],
>     ...
>   ],
>   ...
> }
> 
> Bug: webrtc:7743
> Change-Id: I45dd2c621b830e5aeb081fa8d17c9497a49c2554
> Reviewed-on: https://webrtc-review.googlesource.com/1980
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#19897}

TBR=kjellander@webrtc.org,mbonadei@webrtc.org

Change-Id: I73ff609b0140719473afd36ead1632e5cc3b41f6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7743
Reviewed-on: https://webrtc-review.googlesource.com/2180
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19898}
2017-09-19 10:54:40 +00:00
Mirko Bonadei
0c15c5332f Adding PRESUBMIT check to avoid mixing C, C++ and Objc-C/Obj-C++.
The error message will be something like:

GN targets cannot mix .c (or .cc) and .m (or .mm) source files.
Please create a separate target for each collection of sources.
Mixed sources:
{
  BUILD_GN_PATH: [
    [
      TARGET_NAME,
      [
        SOURCES
      ]
    ],
    ...
  ],
  ...
}

Bug: webrtc:7743
Change-Id: I45dd2c621b830e5aeb081fa8d17c9497a49c2554
Reviewed-on: https://webrtc-review.googlesource.com/1980
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19897}
2017-09-19 09:41:18 +00:00
Mirko Bonadei
a730c1c5ae Enabling and fixing CheckNewlineAtTheEndOfProtoFiles
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}
2017-09-18 10:58:36 +00:00
charujain
9893e253f9 PRESUBMIT: Enforce tracker prefix for all BUG entries
Changed function definition from private to public. This was needed to test the function and to maintain the consistency.

BUG=webrtc:8197
NOTRY=True
R=kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/3010153002 .
Cr-Commit-Position: refs/heads/master@{#19831}
2017-09-14 11:33:23 +00:00