Age | Commit message (Collapse) | Author |
|
androidx-startup-release
Change-Id: I0895ffae49d5810a70f5b92bd355b5c646c8431b
|
|
Bug: 202323961
Merged-In: I976aab264b5da4091d26c0ade453a0e8adaba5be
Change-Id: I48a700bee04850458185184adf0d51e8ae3b9ea1
|
|
->None. am: b0a69d5d42
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1832735
Change-Id: I976aab264b5da4091d26c0ade453a0e8adaba5be
|
|
Fixed import order.
Bug: 196099793
Test: manual
Tested:
$ pylint tools/android_test_mapping_format.py
Change-Id: If3b08adc2a16dde5132aebabf85adf75525c10ef
|
|
am: 20ff9462ea
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1817396
Change-Id: I02a875c5f67441d7614db296d15e1465bb614999
|
|
Made changes to match the internal cl: cl/394099398
+ Used the imperative language in the docstring.
+ Added typing for functions
+ Fixed pylint errors.
+ Added "_" to all globals.
+ Used f' strings
+ Small optimizations to the code to be more efficient.
Bug: 196099793
Test: unittests pass
Tested:
$ pylint tools/android_test_mapping_format.py
$ pylint tools/android_test_mapping_format_unittest.py
$ pytest tools/android_test_mapping_format_unittest.py
Change-Id: I9e8b4be2a6729762001f2e5cd266dccbb0b6f9e9
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1771497
Change-Id: I693543c68d2423aab6526090edb19c596d272e6f
|
|
The Google open source version doesn't support Python 3, and it doesn't
seem like it'll be fixed any time soon. Switch to the forked version
that is maintained by the community as it supports Python 3.
Bug: 185115831
Test: upload tests pass
No-Typo-Check: imported code
Change-Id: I4c8d448f1e80296e5fcce7278eadbd9a80885e67
|
|
androidx-startup-release
Change-Id: I9f5610bfdae1d65c9e77a866cceccf07878abfb9
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1684226
Change-Id: I6cd59a72e03e5645efa256377d53132e4e0c365b
|
|
If we try to run a program that doesn't exist, don't crash while
trying to show the errors to the user.
Bug: 185946409
Test: pre-upload unittests pass
Change-Id: I70e00412bd000e907536011d245eaa82d36634f6
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1675674
Change-Id: Iab95d05c1542318c83c3dc82c63ba424e29a43ab
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1675673
Change-Id: I3c43b2c82244555e4f3c2e389fc253beded24c13
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1675672
Change-Id: I3a55ae0b856938061254560267fd14723f7aab4b
|
|
Bug: None
Test: `repo upload` doesn't flag anything
Change-Id: I404e6694bf2ce9705f4aa96d9e4801780407e4df
|
|
Minor issue that doesn't normally show up, but should still make sure
we explicitly close these handles so the resource trackers don't warn.
Bug: 185196437
Test: unittests pass
Change-Id: I6e64a10243c2d20245e37d090e1c167067f0f13c
|
|
We force the returned value to use strings for stdout/stderr, but the
exceptions thrown here don't do that. We only catch the exception in
two places when the underlying command fails, so we rarely hit this
code path. Add more unittests to make sure it works.
Bug: 185196437
Test: unittests pass
Test: repo upload in a project w/clang_format enabled & no /usr/bin/python works
Change-Id: Ic29c5dbd324a24333d99a500cc82913ae7bea93a
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1570580
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I16d6ba29799efe3db4918d3bf8163d4d2e0b8100
|
|
Bug: None
Test: unittests pass
Change-Id: Ib34c1ade62a139080aaca1e0972e84a0a53ab2d1
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1567662
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I277a33975d2cfc201511a615d3d9e9d46a3eba69
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1566818
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I66906372a09f619036ebc74bae6b67fc338080e8
|
|
Python 3's configparser has a better get() API that has equivalent
functionality as the default logic we implemented. Switch to it.
Bug: None
Test: all unittests pass
Change-Id: Ie9698351f6d7bc108c3e93b642dac9b6ca8ed78d
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1566558
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I51a5fd172058f876da8dcf0e177a8b8ac246e6c7
|
|
Bug: None
Test: unittests pass
Change-Id: I557d84808934455642026b280992cddc0c7028d7
|
|
Bug: None
Test: unittests still pass
Change-Id: Ia809f1b8e84bdf0469977f687815a210e600becb
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1553823
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ieb6bbd35340e91586d64ff522174c53a27016085
|
|
aidl-format formats AIDL files.
Bug: 144540481
Test: Add `aidl_format = true` to /system/tools/aidl/REUPLOAD.cfg,
make a poorly formatted change in one of the AIDL file in the repo.
Creating a commit and executing `repo upload` caught it and did an
automatic fixup.
[FAILED] aidl_format
FILES: ('tests/android/aidl/tests/ITestService.aidl',) 17,18d16
...
[RUNNING 5/5] aidl_format
An automatic fix can be attempted for the "aidl_format" hook. Do you
want to run it? (Yes/no)? yes
Fix successfully applied. Amend the current commit before attempting to
upload again.
[FAILED] repohooks for platform/system/tools/aidl failed in 10.274s
FATAL: Preupload failed due to above error(s).
Change-Id: I3081360840dfbe989908cdffe189573799fc29ab
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1373920
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I8be1bd9e133bad65c2cf6a55ae3b60ef141d3200
|
|
We've been emitting warnings about this for almost a year.
Bug: None
Test: `repo upload` still works w/Python 3.6
Change-Id: Iaead2a48ac125749176925302bf32e655384c965
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1515460
Change-Id: I7e38ffca92d04ddcce84ef12471dbbdb84ab4855
|
|
Bug: None
Test: added some slow hooks and reviewed the logged output
Change-Id: I19b024e995b564a12d929db2c5cf15a3e5a4a2b6
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1515081
Change-Id: Icb2d75c6ba4a2337f857540f83f94e8772821cd8
|
|
These are only used by Python 2 which we don't support.
Bug: None
Test: unittests pass
Change-Id: If5f26ca655ce58a9968eaa624424cf5186cf9625
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1504936
Change-Id: I7e8c7b223cd20bf54fbfc17ef6dc9f66cb3a3031
|
|
This accounts for the case where we use triple quotes, but check
for singular quotes. Triple quotes are supported, so we need
to make sure we account for them when checking correctness.
This also fixes a triple quote use case that is technically
correct, but not supported.
Bug: 173702182
Test: ./hooks_unittest.py
Change-Id: I0b6e6deeac0addc3939b27db36a6ba47ff4bd2da
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1490697
Change-Id: I7734954e62f9a8b5ee53a064f341238b0af490e0
|
|
Because we need the quotes to check for starting and ending
Relnote tags, having unescaped quotes in the release note causes
the parsing to truncate at that unescaped release note.
So the following scenarios will now be disallowed:
Relnote: There are "quotes" in this relnote.
Relnote: "There are "quotes" in this relnote."
Relnote: "There are unescaped quotes in the second half of
this "sentence"."
Bug: 172663867
Test: ./pre-upload.py
Change-Id: Idc3769eab64aff7455453b9d50317e0d0cad2a44
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1486482
Change-Id: I959401c88303f39673eb837873a9f2581a600c0c
|
|
We require Python 3 everywhere, so no point in this.
Bug: None
Test: unittests pass
Change-Id: If47bc351829610f7d7677f5255dc433ca1294079
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1408931
Change-Id: Ieb4c41d997b5ddd49d9f58a1f257e56e53456dd0
|
|
gofmt -w writes the gofmt result to the source file for the files that
gofmt reports issues.
Bug: 116112526
Test: ran hook for gofmt can now auto-fix formatting
Change-Id: Ic676a588a567fbe5cf3f7a1411ac8048bde2af06
|
|
androidx-startup-release
Change-Id: Id03b456aebe7328c8e9f418305b6f392b5e6aa0a
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1428528
Change-Id: Ie5f6a45ff10bffed2d6e1a2da1115cb2a8202c3a
|
|
re.Pattern was only introduced in Python 3.7.
Test: ./pre-upload
Bug: 168593718
Change-Id: I9dc685a8d1863808d9c475539a8f1fdbd96474d0
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1422908
Change-Id: I92a7234bfbfd5076856a51ccca953aa6889c4611
|
|
We did this for pylint already, so switch the rest too.
Bug: None
Test: running each tool with --help works
Change-Id: I0c6156cbcfabf2ebb7874cbb8a52059b1a88dfcc
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1395027
Change-Id: Ia33c2a2caf6d02259fb3b393157a08d7e5e64a3f
|
|
There is currently no convenient option to enable a hook globally if
some projects will fail the processing. The recommended setup is to
enable the hook within each project's repository (using PREUPLOAD.cfg).
This creates inconsistencies for large codebase. Adds a new
configuration section to explicitly exclude some projects during the
processing of a hook.
The intent of this change is to enable rustfmt globally in AOSP,
except for some paths (e.g. external/, vendor/).
Test: Modified GLOBAL-PREUPLOAD.cfg to enable the new option,
manually creates changes and review output of pre-upload.py
Bug: 160223496
Change-Id: I94dbbf0ce2e6b58c4d4b4fc89c56a2a87543d878
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1417624
Change-Id: I80c4a873c4e87b9936104d94e6723a72b3649341
|
|
No point in linting or testing when the code forces Python 3.6+.
Bug: None
Test: `repo upload` still works
Change-Id: I5af19b5dc70be3f5be99157d1fc4287e4437c553
|